:root {
  --bg: #f4f6fb;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #697386;
  --soft: #eef2f7;
  --line: #dfe5ee;
  --red: #d9272f;
  --red-deep: #9f141b;
  --gold: #d99a25;
  --gold-soft: #fff2cf;
  --blue: #1e65d8;
  --green: #0d9a70;
  --slate: #25324a;
  --shadow: 0 18px 46px rgba(23, 32, 51, .12);
  --shadow-soft: 0 10px 28px rgba(23, 32, 51, .08);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(217,39,47,.08), rgba(30,101,216,.035) 42%, transparent),
    var(--bg);
}

a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 34px; line-height: 1.15; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 20px; line-height: 1.25; }
h3 { margin-bottom: 8px; font-size: 17px; line-height: 1.3; }
p { color: var(--muted); line-height: 1.65; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 52px;
}
.shell.narrow { width: min(920px, calc(100% - 32px)); }
.consumer-shell { padding-bottom: 92px; }

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  position: relative;
}
.consumer-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 8px 10px;
  border: 1px solid rgba(223,229,238,.8);
  border-radius: 999px;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(23,32,51,.06);
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.identity img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px;
}
.identity strong { display: block; font-size: 17px; }
.identity span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.member-entry { flex: 0 0 auto; }
.member-entry-phone {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}
.member-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(23,32,51,.08);
}
.member-chip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}
.member-chip span {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.hero, .panel, .form-block, .phone-card {
  border: 1px solid rgba(223, 229, 238, .9);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.hero {
  min-height: 360px;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 30px;
  align-items: stretch;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(159,20,27,.97), rgba(217,39,47,.92) 46%, rgba(217,154,37,.88)),
    #b91c1c;
  color: #fff;
  box-shadow: 0 24px 60px rgba(159,20,27,.24);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.26), transparent 22%),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  max-width: 680px;
  color: #fff;
  font-size: 44px;
  line-height: 1.08;
}
.hero p {
  max-width: 650px;
  color: rgba(255,255,255,.86);
  font-size: 16px;
}
.brand-row { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.brand-row img {
  height: 48px;
  width: 84px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.7);
}
.hero-actions, .toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions { margin-top: 24px; }
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.proof-card {
  min-height: 76px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
}
.proof-card strong { display: block; font-size: 20px; color: #fff; }
.proof-card span { display: block; margin-top: 4px; color: rgba(255,255,255,.78); font-size: 12px; }
.hero-device {
  min-height: 290px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 16px;
  display: grid;
  align-content: center;
}
.mini-phone {
  width: min(290px, 100%);
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 22px 50px rgba(0,0,0,.22);
  overflow: hidden;
}
.mini-phone-head {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.mini-phone-head img { width: 42px; height: 42px; object-fit: contain; }
.mini-phone-body { padding: 16px; }
.mini-prize {
  border-radius: 8px;
  background: linear-gradient(135deg, #fff5e0, #fff);
  border: 1px solid #f2d798;
  padding: 14px;
  text-align: center;
}
.mini-prize strong { display: block; font-size: 26px; color: var(--red); }
.mini-steps {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.mini-steps span {
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  margin-top: 18px;
  padding: 22px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}
.section-head span, .section-head p { color: var(--muted); margin: 4px 0 0; }
.section-kicker {
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 6px;
}

.guide-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, .72fr);
  gap: 20px;
  align-items: stretch;
  padding: 30px;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(159,20,27,.96), rgba(217,39,47,.92) 44%, rgba(217,154,37,.9)),
    #b91c1c;
  box-shadow: 0 24px 60px rgba(159,20,27,.22);
}
.ad-lottery-hero {
  min-height: calc(100vh - 116px);
  align-items: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,231,168,.34), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(255,255,255,.2), transparent 22%),
    linear-gradient(135deg, #8f1118 0%, #c51f29 48%, #e0a33a 100%);
  box-shadow: 0 26px 68px rgba(159,20,27,.26);
}
.guide-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,231,168,.09) 0 1px, transparent 1px 16px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  pointer-events: none;
}
.guide-hero > * { position: relative; z-index: 1; }
.guide-copy { align-self: center; }
.guide-copy h1 {
  max-width: 680px;
  color: #fff;
  font-size: 54px;
  line-height: 1.02;
  text-shadow: 0 8px 24px rgba(80,0,0,.22);
}
.guide-copy p {
  max-width: 660px;
  color: rgba(255,255,255,.88);
  font-size: 16px;
}
.location-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.26);
  font-weight: 900;
  margin-bottom: 14px;
}
.consumer-brand-row {
  align-items: center;
}
.consumer-brand-row img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}
.consumer-brand-row span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.88);
  font-weight: 900;
  font-size: 13px;
}
.today-card {
  align-self: stretch;
  border: 1px solid rgba(240,209,155,.95);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,247,220,.92), rgba(255,255,255,.98) 42%),
    #fff;
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 24px 60px rgba(67,14,17,.22);
  display: grid;
  align-content: center;
  gap: 14px;
}
.today-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.today-card-head img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.today-card-head strong { display: block; font-size: 20px; }
.today-card-head span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.benefit-grid div, .mini-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.lottery-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 2px 2px 0;
}
.lottery-caption strong {
  color: var(--red);
  font-size: 15px;
}
.lottery-caption span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.benefit-grid strong, .mini-metrics strong {
  display: block;
  color: var(--red);
  font-size: 20px;
}
.benefit-grid span, .mini-metrics span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.ad-result {
  border-radius: 8px;
  background: #fff7df;
  border: 1px solid #f0d19b;
  padding: 12px;
  color: #7a4a05;
  font-size: 13px;
  line-height: 1.55;
}
.home-zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  transform-origin: center;
  padding: 10px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(159,20,27,.08), rgba(217,154,37,.06)),
    #fffaf0;
  border: 1px solid #f0d19b;
}
.home-zodiac-grid.spinning {
  animation: homeGridSpin 3s cubic-bezier(.2,.8,.18,1) forwards;
}
.home-zodiac-tile {
  position: relative;
  min-height: 76px;
  border-radius: 8px;
  transform-style: preserve-3d;
  transition: transform .45s ease;
}
.home-zodiac-grid.spinning .home-zodiac-tile {
  animation: homeTileSpin 3s cubic-bezier(.2,.8,.18,1) forwards;
}
.home-zodiac-back,
.home-zodiac-front {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  border: 1px solid rgba(255,231,168,.28);
}
.home-zodiac-back {
  background:
    radial-gradient(circle at 50% 36%, rgba(255,231,168,.18), transparent 20%),
    repeating-linear-gradient(45deg, rgba(255,231,168,.08) 0 1px, transparent 1px 9px),
    linear-gradient(145deg, #4a0c10, #1a070a 58%, #090405);
  color: rgba(255,231,168,.68);
  font-size: 25px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 8px 16px rgba(23,32,51,.1);
}
.home-zodiac-front {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #fff7dc, #fff);
  color: #7a4a05;
  padding: 8px 4px;
  text-align: center;
  align-content: center;
  gap: 2px;
  border-color: #f0d19b;
}
.home-zodiac-front span { font-size: 23px; line-height: 1; }
.home-zodiac-front strong { font-size: 12px; line-height: 1.2; }
.home-zodiac-grid.revealed .home-zodiac-tile {
  transform: rotateY(180deg);
}
.home-zodiac-grid.revealed .home-zodiac-tile.active {
  transform: rotateY(180deg) translateY(-4px);
}
.home-zodiac-grid.revealed .home-zodiac-tile.active .home-zodiac-front {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217,39,47,.14), 0 12px 26px rgba(217,39,47,.24);
  background: linear-gradient(180deg, #ffe7a8, #fff);
}
.ad-win-result {
  display: grid;
  gap: 5px;
}
.ad-win-result strong {
  color: var(--red);
  font-size: 18px;
}
.ad-win-result span {
  color: #7a4a05;
  font-weight: 900;
}
.ad-win-result small { color: var(--muted); line-height: 1.5; }
.ad-watch-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 13, 20, .72);
}
.ad-watch-card {
  width: min(420px, 100%);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.ad-watch-card img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.ad-watch-card h2 { margin: 12px 0 4px; }
.ad-watch-card p { margin-bottom: 12px; }
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(560px, calc(100% - 24px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(23,32,51,.14);
}
.bottom-nav a {
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.bottom-nav a:hover {
  background: #fff2cf;
  color: var(--red);
}
@keyframes homeGridSpin {
  0% { transform: rotate(0deg) scale(1); }
  42% { transform: rotate(420deg) scale(.98); }
  72% { transform: rotate(820deg) scale(.92); }
  100% { transform: rotate(1080deg) scale(1); }
}
@keyframes homeTileSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1080deg); }
}
.ad-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 14px;
}
.ad-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.ad-preview h3 { margin-bottom: 8px; }
.ad-preview p { margin-bottom: 6px; font-size: 13px; }
.compact-form { gap: 10px; }
.guide-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.consumer-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}
.daily-progress {
  background: rgba(255,255,255,.96);
}
.progress-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.progress-metrics div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #fbfcff);
}
.progress-metrics strong {
  display: block;
  color: var(--red);
  font-size: 22px;
}
.progress-metrics span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.guide-side {
  display: grid;
  gap: 18px;
}
.panel.compact { padding: 18px; margin-top: 0; }
.guide-main { margin-top: 0; }
.tip-list {
  display: grid;
  gap: 9px;
}
.tip-item, .tip-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px 11px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}
.mini-metrics {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.scene-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.scene-filter button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 11px;
  font-weight: 900;
  color: var(--ink);
  cursor: pointer;
}
.scene-filter button.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 42px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(23,32,51,.08); }
.btn.primary {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
  border-color: transparent;
}
.btn.gold {
  background: linear-gradient(135deg, #ffe3a1, #d99a25);
  color: #3a2508;
  border-color: transparent;
}
.btn.ghost { background: rgba(255,255,255,.14); color: inherit; border-color: rgba(255,255,255,.34); }
.btn.full { width: 100%; }
.btn.big { min-height: 56px; font-size: 18px; }
.link { color: var(--blue); text-decoration: none; font-weight: 800; }

.merchant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.merchant-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,242,207,.42), transparent 52%),
    #fff;
  box-shadow: 0 8px 22px rgba(23,32,51,.05);
}
.merchant-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.merchant-card h3 { margin-bottom: 4px; font-size: 17px; }
.merchant-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.merchant-card img.qr {
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  margin: 12px 0;
  background: #fff;
}
.merchant-actions {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}
.merchant-tag {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a4a05;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 12px;
}
.url {
  margin-top: 8px;
  font-size: 12px;
  color: var(--blue);
  word-break: break-all;
  line-height: 1.5;
}

.mobile {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 16% 8%, rgba(255,214,128,.34), transparent 26%),
    radial-gradient(circle at 84% 2%, rgba(217,39,47,.22), transparent 30%),
    linear-gradient(180deg, #fff8ec 0%, #f6f7fb 46%, #eef3fb 100%);
}
.phone-card {
  width: min(440px, 100%);
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.phone-hero {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(159,20,27,.96), rgba(217,39,47,.92) 54%, rgba(217,154,37,.9)),
    var(--red);
  color: #fff;
}
.top-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 5px;
}
.top-logo strong { display: block; font-size: 18px; color: #fff; }
.top-logo span { color: rgba(255,255,255,.78); font-size: 13px; }
.phone-hero h1 { font-size: 30px; color: #fff; margin-bottom: 8px; }
.phone-hero p { color: rgba(255,255,255,.84); margin-bottom: 0; }
.phone-body { padding: 18px; }
.merchant-info {
  border: 1px solid #f0d19b;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff6df, #fff);
}
.merchant-info h1 { font-size: 21px; margin-bottom: 4px; }
.merchant-info p { margin-bottom: 5px; }
.merchant-info strong { color: var(--red); }
.form-block {
  padding: 16px;
  background: #fff;
}
.form-block h2 { margin-bottom: 10px; }
.form-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: 13px;
}
.rules-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  text-align: left;
}
.rules-box summary {
  min-height: 42px;
  padding: 11px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}
.rules-box div {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}
.rules-box p {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.55;
}
label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 44px;
  font: inherit;
  background: #fff;
}
input:focus { outline: 3px solid rgba(30,101,216,.13); border-color: var(--blue); }
.hidden { display: none !important; }
.phone-fallback {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.draw-box { text-align: center; }
.zodiac-stage {
  --radius: 122px;
  width: min(320px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 28%, #fff7dc 29% 43%, rgba(217,39,47,.1) 44% 100%);
  border: 1px solid #f2d798;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.62), 0 16px 36px rgba(217,39,47,.16);
}
.zodiac-stage::before {
  content: "";
  position: absolute;
  inset: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 26px rgba(23,32,51,.1);
}
.zodiac-center {
  position: absolute;
  inset: 50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
}
.zodiac-center img { width: 68px; height: 68px; object-fit: contain; }
.zodiac-wheel {
  position: absolute;
  inset: 0;
  transform-origin: center;
}
.zodiac-stage.spinning .zodiac-wheel {
  animation: zodiacWheelShuffle 3.5s cubic-bezier(.18,.78,.18,1) forwards;
}
.zodiac-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  min-height: 66px;
  margin-left: -27px;
  margin-top: -33px;
  transform:
    rotate(var(--angle))
    translateY(calc(var(--radius) * -1))
    rotate(calc(var(--angle) * -1));
  border: 1px solid #f0d19b;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fff8e8);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(23,32,51,.08);
}
.zodiac-card::before {
  content: "福";
  position: absolute;
  inset: 7px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 36%, #ffe59b 0 22%, transparent 23%),
    linear-gradient(145deg, #d9272f, #9f141b);
  color: #ffe7a8;
  font-size: 26px;
  font-weight: 900;
  border: 1px solid rgba(255,231,168,.5);
  z-index: 2;
}
.zodiac-stage.spinning .zodiac-card {
  animation: zodiacCardShuffle 3.5s cubic-bezier(.2,.8,.18,1) forwards;
  animation-delay: calc(var(--i) * 22ms);
}
.zodiac-card .animal { font-size: 25px; line-height: 1; }
.zodiac-card .name { font-size: 12px; font-weight: 900; color: #7a4a05; }
.zodiac-stage.settled .zodiac-card::before { display: none; }
.zodiac-card.active {
  background: linear-gradient(180deg, #fff2bf, #fff);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217,39,47,.12), 0 10px 22px rgba(217,39,47,.18);
}
.collection-box {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}
.collection-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  margin-bottom: 9px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.collection-item {
  min-height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 1px;
  font-size: 18px;
  background: #f1f4f8;
  color: #9aa4b2;
  border: 1px solid #e5eaf1;
}
.collection-item small {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
}
.collection-item.owned {
  background: #fff3ce;
  color: #7a4a05;
  border-color: #e8c46d;
}
@keyframes zodiacWheelShuffle {
  0% { transform: rotate(0deg) scale(1); }
  38% { transform: rotate(520deg) scale(1); }
  58% { transform: rotate(760deg) scale(.74); }
  78% { transform: rotate(980deg) scale(.74); }
  100% { transform: rotate(1080deg) scale(1); }
}
@keyframes zodiacCardShuffle {
  0% {
    transform:
      rotate(var(--angle))
      translateY(calc(var(--radius) * -1))
      rotate(calc(var(--angle) * -1));
  }
  42% {
    transform:
      rotate(calc(var(--angle) + 120deg))
      translateY(calc(var(--radius) * -1))
      rotate(calc((var(--angle) + 120deg) * -1));
  }
  58% {
    transform:
      rotate(calc(var(--angle) + 260deg))
      translateY(-34px)
      rotate(calc((var(--angle) + 260deg) * -1))
      scale(.82);
  }
  76% {
    transform:
      rotate(calc(var(--angle) + 520deg))
      translateY(-42px)
      rotate(calc((var(--angle) + 520deg) * -1))
      scale(.78);
  }
  100% {
    transform:
      rotate(var(--angle))
      translateY(calc(var(--radius) * -1))
      rotate(calc(var(--angle) * -1));
  }
}
.mascot-wrap {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 6px auto 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #fff 0 46%, #ffe6b0 47% 62%, #d9272f 63% 100%);
  border: 1px solid #ffd08b;
  box-shadow: 0 16px 34px rgba(217,39,47,.22);
}
.mascot-wrap img { width: 120px; height: 120px; object-fit: contain; }
.fine { font-size: 12px; margin: 12px 0 0; color: var(--muted); }
.result-box {
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: #fbfcff;
}
.result-box.win { border-color: rgba(217,39,47,.35); background: linear-gradient(135deg, #fff5f5, #fff); }
.result-box.lose { border-color: rgba(13,154,112,.35); background: linear-gradient(135deg, #f0fff8, #fff); }
.result-box h2 { margin-bottom: 8px; }
.result-highlight {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
  margin: 10px 0;
}
.phone-verify {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.phone-verify h3 { margin-bottom: 6px; }
.phone-verify p { margin-bottom: 8px; font-size: 13px; }
.phone-verify input { margin-bottom: 8px; }
.ai-guide {
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #f0d19b;
  background: linear-gradient(180deg, #fff8e6, #fff);
  text-align: left;
}
.ai-guide.loading {
  color: var(--muted);
  font-size: 13px;
}
.ai-guide-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ai-guide-head h3 { margin-bottom: 3px; }
.ai-guide-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.chain-box {
  display: grid;
  gap: 3px;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}
.chain-box strong { color: var(--red); }
.chain-box span { color: var(--muted); font-size: 12px; }
.scene-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.scene-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.recommend-grid {
  display: grid;
  gap: 8px;
}
.recommend-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}
.recommend-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.recommend-top span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.recommend-card p { margin: 7px 0; font-size: 13px; }
.recommend-card small { color: var(--muted); line-height: 1.5; }
.recommend-actions {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 8px;
  margin-top: 9px;
}
.recommend-actions .btn { min-height: 38px; padding: 8px 10px; }
.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: rgba(23,32,51,.07);
  border-radius: 6px;
  padding: 2px 6px;
  word-break: break-all;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.output {
  white-space: pre-wrap;
  background: #111827;
  color: #e5e7eb;
  padding: 14px;
  border-radius: 8px;
  min-height: 90px;
  overflow: auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f9fbff);
}
.stat strong { display: block; font-size: 25px; margin-bottom: 4px; color: var(--ink); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat.accent strong { color: var(--red); }
.table-wrap { overflow-x: auto; }
.trend-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f7faff);
}
.trend-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.trend-card-head strong { font-size: 15px; }
.trend-card-head span { color: var(--muted); font-size: 12px; }
.trend-bars {
  min-height: 184px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.trend-bar-item {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.trend-bar-track {
  width: 100%;
  height: 112px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 6px 0;
  border-radius: 12px;
  background: var(--soft);
}
.trend-bar-fill {
  width: min(28px, 70%);
  min-height: 8px;
  border-radius: 999px 999px 8px 8px;
  box-shadow: 0 10px 18px rgba(23,32,51,.12);
}
.trend-bar-item strong { font-size: 15px; }
.trend-bar-item small { color: var(--muted); font-size: 12px; }
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-cell img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}
.user-cell strong,
.user-cell span {
  display: block;
}
.user-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}
th { color: var(--muted); font-size: 12px; white-space: nowrap; background: #f7f9fc; }
tbody tr:hover { background: #fbfcff; }
.admin-pass { display: grid; grid-template-columns: 90px 160px; gap: 8px; align-items: center; }
.admin-pass label { margin: 0; }
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef4ff;
  color: var(--blue);
}
.badge.warn { background: #fff7ed; color: #9a5b02; }
.badge.ok { background: #ecfdf3; color: var(--green); }
.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.anti-score {
  min-height: 118px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff2cf, #fff);
  border: 1px solid #f2d798;
}
.anti-score strong {
  display: block;
  color: var(--red);
  font-size: 48px;
  line-height: 1;
}
.anti-score span {
  color: var(--muted);
  font-weight: 900;
}
.tip-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 42px;
  font: inherit;
  background: #fff;
}

.empty-state {
  padding: 18px;
  border-radius: 8px;
  border: 1px dashed #cfd7e3;
  background: #fbfcff;
  color: var(--muted);
}
.member-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(159,20,27,.96), rgba(217,39,47,.9) 58%, rgba(217,154,37,.86)),
    var(--red);
  color: #fff;
  box-shadow: 0 20px 46px rgba(159,20,27,.18);
}
.member-hero > img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 3px solid rgba(255,255,255,.72);
}
.member-hero h1 { color: #fff; margin-bottom: 4px; font-size: 28px; }
.member-hero p { color: rgba(255,255,255,.84); margin-bottom: 2px; }
.member-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
}
.member-empty img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  margin-bottom: 10px;
}
.member-progress {
  display: grid;
  gap: 12px;
}
.progress-line {
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold));
}
.member-zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.member-zodiac {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 3px;
}
.member-zodiac.owned {
  background: linear-gradient(180deg, #fff3ce, #fff);
  border-color: #e8c46d;
}
.member-zodiac strong { color: var(--ink); }
.member-zodiac span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.member-zodiac.owned span { color: var(--red); }
.member-zodiac small { color: var(--muted); line-height: 1.45; }
.member-list {
  display: grid;
  gap: 10px;
}
.member-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.member-list-item strong,
.member-list-item span,
.member-list-item small {
  display: block;
}
.member-list-item span { margin-top: 4px; color: var(--red); font-weight: 900; }
.member-list-item small { margin-top: 4px; color: var(--muted); line-height: 1.45; }

@media (max-width: 860px) {
  .hero, .guide-hero, .consumer-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .guide-copy h1 { font-size: 38px; }
  .hero-proof { grid-template-columns: 1fr; }
  .progress-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar, .section-head { flex-direction: column; align-items: stretch; }
  .consumer-topbar { flex-direction: row; align-items: center; }
  .grid.two { grid-template-columns: 1fr; }
  .admin-pass { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .shell { width: min(100% - 24px, 1180px); padding-top: 16px; }
  .hero, .guide-hero { padding: 20px; }
  .ad-lottery-hero { min-height: auto; }
  .today-card { padding: 14px; }
  .home-zodiac-tile { min-height: 66px; }
  .home-zodiac-front strong { font-size: 11px; }
  .bottom-nav { bottom: 8px; width: min(560px, calc(100% - 18px)); }
  .zodiac-stage { --radius: 108px; }
  .zodiac-card { width: 48px; min-height: 60px; margin-left: -24px; margin-top: -30px; }
  .zodiac-card .animal { font-size: 22px; }
  .collection-grid { grid-template-columns: repeat(4, 1fr); }
  .member-chip span { display: none; }
  .member-chip { padding: 6px; }
  .member-hero { grid-template-columns: 64px 1fr; }
  .member-hero > img { width: 64px; height: 64px; }
  .member-hero .btn { grid-column: 1 / -1; }
}

@media print {
  body { background: #fff; }
  .btn, .toolbar, .topbar { display: none; }
  .shell { width: 100%; padding: 0; }
  .panel { box-shadow: none; border: 0; }
}

/* Refined homepage */
body:has(.consumer-shell) {
  background:
    linear-gradient(180deg, rgba(255, 245, 230, .9) 0%, rgba(246, 248, 252, .94) 42%, #eef3f7 100%),
    var(--bg);
}

.home-identity {
  color: inherit;
  text-decoration: none;
}

.consumer-shell {
  width: min(1200px, calc(100% - 32px));
}

.consumer-topbar {
  margin-bottom: 16px;
}

.ad-lottery-hero {
  min-height: calc(100vh - 138px);
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .72fr);
  gap: 28px;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid rgba(255, 236, 180, .55);
  background:
    linear-gradient(135deg, rgba(114, 18, 27, .96) 0%, rgba(203, 37, 47, .94) 48%, rgba(218, 155, 55, .94) 100%),
    #b91c1c;
}

.ad-lottery-hero::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: .8;
}

.guide-copy h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(42px, 6.3vw, 76px);
  line-height: 1.02;
}

.guide-copy p {
  max-width: 660px;
  font-size: 17px;
  line-height: 1.75;
}

.consumer-brand-row {
  margin-bottom: 20px;
}

.consumer-brand-row img {
  box-shadow: 0 10px 22px rgba(71, 11, 15, .18);
}

.location-badge,
.consumer-brand-row span,
.trust-strip span {
  backdrop-filter: blur(10px);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.trust-strip span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.84);
  font-size: 12px;
  font-weight: 900;
}

.today-card {
  position: relative;
  align-content: stretch;
  padding: 20px;
  background:
    linear-gradient(180deg, #fff8df 0%, #fff 48%),
    #fff;
}

.today-ribbon {
  justify-self: start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #1d2538;
  color: #ffe4a8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.today-card-head {
  padding-bottom: 4px;
}

.today-card-head img {
  border-radius: 50%;
  background: #fff;
  border: 1px solid #f2d798;
  padding: 5px;
}

.benefit-grid div,
.progress-metrics div,
.merchant-card,
.tip-item {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.benefit-grid div {
  background: linear-gradient(180deg, #fff, #fffaf0);
}

.home-zodiac-grid {
  gap: 9px;
}

.home-zodiac-tile {
  min-height: 72px;
}

.home-zodiac-back {
  font-family: "Microsoft YaHei", sans-serif;
  color: #ffe3a1;
}

.home-zodiac-front {
  gap: 5px;
}

.home-zodiac-front span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: #fff3ce;
  color: #9f141b;
  font-size: 16px;
  font-weight: 900;
}

.home-zodiac-front strong {
  font-size: 12px;
}

.daily-progress,
.guide-main,
.guide-side .panel {
  background: rgba(255,255,255,.96);
}

.progress-metrics div:hover,
.merchant-card:hover,
.tip-item:hover {
  transform: translateY(-2px);
  border-color: rgba(217,154,37,.48);
  box-shadow: 0 12px 28px rgba(23,32,51,.08);
}

.merchant-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.merchant-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.merchant-card img.qr {
  width: 120px;
  height: 120px;
  margin: 2px 0;
}

.merchant-tag {
  white-space: nowrap;
}

.scene-filter button {
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.scene-filter button:hover {
  transform: translateY(-1px);
  border-color: rgba(217,39,47,.34);
}

.bottom-nav a {
  white-space: nowrap;
}

@media (max-width: 860px) {
  .ad-lottery-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .guide-copy h1 {
    font-size: clamp(36px, 10vw, 48px);
  }
}

@media (max-width: 520px) {
  .consumer-shell {
    width: min(100% - 20px, 1200px);
  }

  .consumer-topbar {
    border-radius: 18px;
  }

  .identity img {
    width: 40px;
    height: 40px;
  }

  .identity strong {
    font-size: 15px;
  }

  .identity span {
    font-size: 12px;
  }

  .ad-lottery-hero,
  .panel {
    padding: 16px;
  }

  .guide-copy h1 {
    font-size: 36px;
  }

  .guide-copy p {
    font-size: 15px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .benefit-grid,
  .progress-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .merchant-actions {
    grid-template-columns: 1fr;
  }
}

/* 3099 product refresh */
:root {
  --bg: #f5f7f6;
  --paper: #ffffff;
  --ink: #1d2733;
  --muted: #69737f;
  --soft: #eef2f0;
  --line: #dde5e0;
  --red: #cf2f35;
  --red-deep: #8f1d25;
  --gold: #d6a247;
  --gold-soft: #fff1cd;
  --blue: #2762c7;
  --green: #14795f;
  --slate: #26323f;
  --shadow: 0 18px 48px rgba(29, 39, 51, .12);
  --shadow-soft: 0 10px 28px rgba(29, 39, 51, .08);
}

body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(241,246,244,.94) 38%, #edf3f0 100%),
    var(--bg);
}

body:has(.consumer-shell) {
  background:
    linear-gradient(180deg, rgba(255,252,244,.98), rgba(242,247,245,.96) 42%, #eaf1ee 100%),
    var(--bg);
}

.shell {
  width: min(1160px, calc(100% - 40px));
  padding-top: 22px;
}

.consumer-shell {
  width: min(1180px, calc(100% - 40px));
}

.topbar,
.consumer-topbar {
  border-radius: 8px;
}

.consumer-topbar {
  min-height: 66px;
  padding: 9px 12px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(221,229,224,.86);
  box-shadow: 0 10px 26px rgba(29,39,51,.06);
}

.identity {
  text-decoration: none;
}

.identity img {
  border-radius: 8px;
}

.identity strong {
  font-size: 16px;
  letter-spacing: 0;
}

.identity span {
  color: #6d7680;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf9;
}

.desktop-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.desktop-nav a:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(29,39,51,.07);
}

.ad-lottery-hero {
  min-height: min(720px, calc(100vh - 132px));
  grid-template-columns: minmax(0, 1fr) minmax(350px, .62fr);
  gap: 30px;
  padding: clamp(24px, 4.6vw, 52px);
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(91,30,34,.98) 0%, rgba(181,45,52,.96) 48%, rgba(216,165,75,.95) 100%),
    #a8242c;
  box-shadow: 0 26px 58px rgba(117, 30, 35, .22);
}

.ad-lottery-hero::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: .65;
}

.guide-copy h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(42px, 5.9vw, 68px);
  line-height: 1.04;
  text-shadow: none;
}

.guide-copy p {
  max-width: 680px;
  color: rgba(255,255,255,.88);
  font-size: 17px;
  line-height: 1.75;
}

.consumer-brand-row span,
.location-badge,
.trust-strip span {
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.13);
  box-shadow: none;
}

.consumer-brand-row img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  box-shadow: none;
}

.hero-actions .btn {
  min-height: 48px;
  padding-inline: 18px;
}

.btn {
  border-radius: 8px;
  font-weight: 900;
}

.btn.gold {
  background: linear-gradient(135deg, #ffe5a8, #d7a244);
  color: #32210a;
}

.btn.primary {
  background: #1f2933;
}

.btn.ghost {
  background: rgba(255,255,255,.12);
}

.today-card {
  border: 0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 24px 54px rgba(56, 22, 23, .24);
}

.today-ribbon {
  border-radius: 8px;
  background: #26323f;
  color: #ffe2a5;
}

.benefit-grid div,
.progress-metrics div,
.tip-item,
.merchant-card,
.stat,
.form-block,
.phone-card,
.panel {
  border-radius: 8px;
}

.benefit-grid strong,
.progress-metrics strong {
  color: var(--red);
}

.home-zodiac-grid {
  background: #fff8e7;
}

.home-zodiac-back {
  background:
    linear-gradient(145deg, #3a1115, #17181b 62%, #08090b);
}

.journey-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.journey-strip article {
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-soft);
}

.journey-strip span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #26323f;
  color: #fff;
  font-weight: 900;
}

.journey-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.journey-strip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.daily-progress,
.guide-main,
.guide-side .panel,
.panel {
  border-color: rgba(221,229,224,.95);
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow-soft);
}

.section-kicker {
  color: var(--red);
  letter-spacing: .04em;
}

.section-head h1,
.section-head h2 {
  color: var(--ink);
}

.scene-filter {
  max-width: 440px;
}

.scene-filter button {
  border-radius: 8px;
  background: #f8faf9;
}

.scene-filter button.active {
  background: #26323f;
  border-color: #26323f;
}

.merchant-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.merchant-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: #fff;
}

.merchant-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.merchant-card h3 {
  font-size: 18px;
}

.merchant-card .meta {
  line-height: 1.5;
}

.merchant-tag {
  border-radius: 8px;
}

.merchant-card img.qr {
  width: 112px;
  height: 112px;
  margin-top: 4px;
}

.url {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: #586575;
}

.workbench-panel {
  display: grid;
  gap: 10px;
}

.workbench-panel h2 {
  margin-bottom: 2px;
}

.workbench-panel a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.workbench-panel a:hover {
  border-color: rgba(207,47,53,.35);
  box-shadow: 0 10px 22px rgba(29,39,51,.07);
  transform: translateY(-1px);
}

.workbench-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.ai-panel .tip-list {
  padding-left: 0;
}

.ad-watch-card {
  border-radius: 8px;
}

.bottom-nav {
  border-radius: 8px;
  display: none;
}

.bottom-nav a {
  border-radius: 6px;
}

@media (max-width: 940px) {
  .desktop-nav {
    display: none;
  }

  .journey-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .ad-lottery-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .guide-layout,
  .consumer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell,
  .consumer-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .consumer-topbar {
    align-items: center;
  }

  .identity span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .guide-copy h1 {
    font-size: 38px;
  }

  .ad-lottery-hero,
  .panel {
    padding: 16px;
  }

  .journey-strip {
    grid-template-columns: 1fr;
  }

  .journey-strip article {
    min-height: auto;
  }

  .benefit-grid,
  .progress-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .section-head {
    gap: 12px;
  }

  .bottom-nav {
    display: grid;
  }
}

/* Single-screen lottery homepage */
body:has(.lottery-screen) {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,231,174,.3), transparent 28%),
    linear-gradient(135deg, #5a1218 0%, #b82d35 50%, #d9a24a 100%);
}

.lottery-screen {
  min-height: 100vh;
  display: grid;
  gap: 10px;
  width: min(430px, calc(100% - 16px));
  margin: 0 auto;
  padding: 8px 0 18px;
  color: #fff;
}

.lottery-topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
}

.lottery-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.lottery-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

.lottery-screen .member-chip {
  background: rgba(255,255,255,.96);
}

.lottery-main {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px),
    rgba(80, 15, 21, .28);
  background-size: 36px 36px, 36px 36px, auto;
  box-shadow: 0 24px 60px rgba(40, 10, 13, .22);
}

.lottery-copy {
  min-width: 0;
}

.lottery-copy .location-badge {
  min-height: 30px;
  margin-bottom: 10px;
  padding: 5px 10px;
}

.lottery-copy h1 {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(40px, 11vw, 52px);
  line-height: .98;
  letter-spacing: 0;
}

.lottery-copy p {
  margin-bottom: 0;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  line-height: 1.5;
}

.lottery-screen .hero-actions {
  margin-top: 12px;
}

.lottery-screen .hero-actions .btn {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
}

.lottery-stage-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff8df 0%, #fff 46%),
    #fff;
  color: var(--ink);
  box-shadow: 0 24px 56px rgba(45, 12, 14, .24);
}

.lottery-stage-card .benefit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lottery-stage-card .benefit-grid div {
  min-height: 54px;
  padding: 9px;
}

.lottery-stage-card .benefit-grid strong {
  font-size: 17px;
}

.lottery-stage-card .home-zodiac-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.lottery-stage-card .home-zodiac-tile {
  min-height: 78px;
  aspect-ratio: 1 / 1;
}

.lottery-stage-card .today-card-head {
  align-items: flex-start;
}

.lottery-stage-card .today-card-head span {
  white-space: normal;
  line-height: 1.35;
}

.lottery-stage-card .ad-result {
  margin: 0;
  max-height: 104px;
  overflow: auto;
}

@media (max-width: 900px) {
  body:has(.lottery-screen) {
    overflow: auto;
  }

  .lottery-screen {
    min-height: 100vh;
  }

  .lottery-main {
    grid-template-columns: 1fr;
  }

  .lottery-copy h1 {
    font-size: clamp(38px, 10vw, 58px);
  }

  .lottery-copy p {
    font-size: 15px;
  }

  .lottery-stage-card .home-zodiac-tile {
    min-height: 76px;
  }
}

@media (max-width: 520px) {
  body:has(.lottery-screen) {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .lottery-screen {
    width: min(430px, calc(100% - 16px));
    min-height: 100vh;
    gap: 8px;
    padding: 8px 0 18px;
  }

  .lottery-topbar {
    min-height: 50px;
    padding: 6px 8px;
  }

  .lottery-brand img {
    width: 36px;
    height: 36px;
  }

  .lottery-main {
    gap: 10px;
    padding: 10px;
  }

  .lottery-copy h1 {
    margin-bottom: 8px;
    font-size: 40px;
  }

  .lottery-copy p {
    font-size: 14px;
    line-height: 1.48;
  }

  .lottery-copy .location-badge {
    min-height: 30px;
    margin-bottom: 10px;
    padding: 5px 10px;
  }

  .lottery-screen .hero-actions {
    margin-top: 12px;
  }

  .lottery-screen .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }

  .lottery-stage-card {
    gap: 7px;
    padding: 10px;
  }

  .lottery-stage-card .today-card-head img {
    width: 44px;
    height: 44px;
  }

  .today-card-head strong {
    font-size: 18px;
  }

  .today-card-head span {
    font-size: 11px;
  }

  .lottery-stage-card .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .lottery-stage-card .benefit-grid div {
    min-height: 49px;
    padding: 8px;
  }

  .lottery-stage-card .benefit-grid strong {
    font-size: 17px;
  }

  .lottery-stage-card .benefit-grid span {
    font-size: 11px;
  }

  .lottery-stage-card .home-zodiac-grid {
    gap: 7px;
    padding: 9px;
  }

  .lottery-stage-card .home-zodiac-tile {
    min-height: 76px;
    aspect-ratio: 1 / 1;
  }

  .lottery-stage-card .home-zodiac-front span {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .lottery-stage-card .home-zodiac-front strong {
    font-size: 10px;
  }

  .lottery-stage-card .ad-result {
    padding: 9px;
    font-size: 12px;
    line-height: 1.42;
  }
}

/* Standalone H5 lottery page */
body:has(.h5-lottery-page) {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 230, 158, .36), transparent 28%),
    linear-gradient(160deg, #4d0d12 0%, #a91f2b 48%, #d99b37 100%);
}

.h5-lottery-page {
  min-height: 100vh;
  width: min(430px, 100%);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
}

.h5-lottery-hero {
  min-height: calc(100vh - 30px);
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.07) 1px, transparent 1px),
    rgba(92, 14, 20, .28);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 24px 58px rgba(45, 8, 12, .24);
}

.h5-lottery-brand {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}

.h5-lottery-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  padding: 4px;
}

.h5-lottery-brand strong,
.h5-lottery-brand span {
  display: block;
}

.h5-lottery-brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.h5-lottery-brand span {
  margin-top: 2px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
}

.h5-lottery-title {
  padding-top: 4px;
}

.h5-lottery-title p {
  margin: 0 0 4px;
  color: #ffe7a8;
  font-size: 14px;
  font-weight: 900;
}

.h5-lottery-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(54px, 17vw, 72px);
  line-height: .92;
  letter-spacing: 0;
}

.h5-card-stage {
  padding: 10px;
  border: 1px solid rgba(255, 231, 168, .72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,246,218,.98), rgba(255,255,255,.98)),
    #fff;
  box-shadow: 0 18px 44px rgba(44, 9, 12, .22);
}

.h5-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}

.h5-card-grid.shuffling {
  animation: h5GridShuffle 3s cubic-bezier(.2,.8,.18,1) forwards;
}

.h5-red-card {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 78px;
  border-radius: 8px;
  transform-style: preserve-3d;
  transition: transform .48s ease;
}

.h5-card-grid.shuffling .h5-red-card {
  animation: h5CardShuffle 3s cubic-bezier(.18,.82,.18,1) forwards;
  animation-delay: calc(var(--delay, 0) * 1ms);
}

.h5-red-card:nth-child(1) { --delay: 0; }
.h5-red-card:nth-child(2) { --delay: 24; }
.h5-red-card:nth-child(3) { --delay: 48; }
.h5-red-card:nth-child(4) { --delay: 72; }
.h5-red-card:nth-child(5) { --delay: 96; }
.h5-red-card:nth-child(6) { --delay: 120; }
.h5-red-card:nth-child(7) { --delay: 144; }
.h5-red-card:nth-child(8) { --delay: 168; }
.h5-red-card:nth-child(9) { --delay: 192; }
.h5-red-card:nth-child(10) { --delay: 216; }
.h5-red-card:nth-child(11) { --delay: 240; }
.h5-red-card:nth-child(12) { --delay: 264; }

.h5-card-back,
.h5-card-front {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,231,168,.34);
}

.h5-card-back {
  background:
    radial-gradient(circle at 50% 34%, rgba(255,231,168,.18), transparent 24%),
    repeating-linear-gradient(45deg, rgba(255,231,168,.08) 0 1px, transparent 1px 9px),
    linear-gradient(145deg, #491016, #171014 62%, #080405);
  color: #ffe4a4;
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 10px 20px rgba(33, 8, 10, .22);
}

.h5-card-front {
  transform: rotateY(180deg);
  align-content: center;
  gap: 5px;
  padding: 6px 2px;
  background: linear-gradient(180deg, #fff4c9, #fff);
  border-color: #d9a24a;
  text-align: center;
}

.h5-card-front span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: #cf2f35;
  color: #fff1c5;
  font-size: 22px;
  font-weight: 900;
}

.h5-card-front strong {
  display: block;
  color: #6e220a;
  font-size: 12px;
  line-height: 1.2;
}

.h5-card-grid.revealed .h5-red-card {
  transform: rotateY(180deg);
}

.h5-card-grid.revealed .h5-red-card.active {
  transform: rotateY(180deg) translateY(-5px);
}

.h5-card-grid.revealed .h5-red-card.active .h5-card-front {
  border-color: #cf2f35;
  box-shadow: 0 0 0 3px rgba(207,47,53,.16), 0 12px 26px rgba(207,47,53,.26);
}

.h5-lottery-result {
  min-height: 54px;
  display: grid;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 231, 168, .72);
  border-radius: 10px;
  background: rgba(255, 246, 218, .96);
  color: #7a4a05;
  font-size: 14px;
  line-height: 1.5;
}

.h5-lottery-result strong {
  color: #cf2f35;
}

.h5-draw-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffe5a8, #d99b37);
  color: #331f07;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(59, 20, 8, .2);
}

.h5-draw-button:disabled {
  cursor: wait;
  opacity: .78;
}

@keyframes h5GridShuffle {
  0% { transform: rotate(0deg) scale(1); }
  38% { transform: rotate(320deg) scale(.98); }
  66% { transform: rotate(680deg) scale(.94); }
  100% { transform: rotate(1080deg) scale(1); }
}

@keyframes h5CardShuffle {
  0% { transform: rotate(0deg) scale(1); }
  36% { transform: rotate(180deg) scale(.92); }
  68% { transform: rotate(540deg) scale(.86); }
  100% { transform: rotate(1080deg) scale(1); }
}

@media (max-width: 380px) {
  .h5-lottery-page {
    padding-left: 8px;
    padding-right: 8px;
  }

  .h5-lottery-hero {
    padding: 12px;
    gap: 12px;
  }

  .h5-card-grid {
    gap: 7px;
  }

  .h5-red-card {
    min-height: 72px;
  }
}

/* WeChat-clean H5 lottery skin */
body:has(.h5-lottery-page) {
  color: #1f2329;
  background:
    linear-gradient(180deg, #f6f8f7 0%, #eef3f0 100%);
}

.h5-lottery-page {
  width: min(430px, 100%);
  padding: max(12px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
}

.h5-lottery-hero {
  min-height: calc(100vh - 30px);
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.h5-lottery-brand {
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 35, 41, .06);
  backdrop-filter: none;
}

.h5-lottery-brand img {
  width: 42px;
  height: 42px;
  border: 1px solid #eef0f2;
  border-radius: 12px;
  padding: 3px;
}

.h5-lottery-brand strong {
  color: #1f2329;
  font-size: 17px;
}

.h5-lottery-brand span {
  color: #8a9199;
  font-size: 12px;
}

.h5-lottery-title {
  padding: 6px 2px 0;
}

.h5-lottery-title p {
  margin-bottom: 8px;
  color: #07c160;
  font-size: 13px;
  letter-spacing: 0;
}

.h5-lottery-title h1 {
  color: #1f2329;
  font-size: clamp(46px, 14vw, 58px);
  line-height: .96;
}

.h5-card-stage {
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 35, 41, .07);
}

.h5-card-grid {
  gap: 9px;
}

.h5-red-card {
  min-height: 78px;
  border-radius: 12px;
}

.h5-card-back,
.h5-card-front {
  border-radius: 12px;
}

.h5-card-back {
  border: 1px solid #f0d8dc;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent),
    #e94754;
  color: #fff7e0;
  font-size: clamp(28px, 7vw, 36px);
  box-shadow: 0 8px 18px rgba(233, 71, 84, .18);
}

.h5-card-back::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  pointer-events: none;
}

.h5-card-front {
  border: 1px solid #e5e8eb;
  background: #fbfcfd;
}

.h5-card-front span {
  width: 36px;
  height: 36px;
  background: #07c160;
  color: #fff;
  font-size: 21px;
}

.h5-card-front strong {
  color: #1f2329;
  font-size: 12px;
}

.h5-card-grid.revealed .h5-red-card.active .h5-card-front {
  border-color: #07c160;
  box-shadow: 0 0 0 3px rgba(7,193,96,.13), 0 12px 24px rgba(7,193,96,.16);
}

.h5-lottery-result {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #59636e;
  box-shadow: 0 8px 22px rgba(31, 35, 41, .05);
}

.h5-lottery-result strong {
  color: #e94754;
}

.h5-draw-button {
  min-height: 54px;
  border-radius: 14px;
  background: #07c160;
  color: #fff;
  box-shadow: 0 12px 24px rgba(7,193,96,.22);
}

.h5-draw-button:active {
  transform: translateY(1px);
  background: #06ad56;
}

.h5-draw-button:disabled {
  background: #8bdcb3;
  opacity: 1;
}

@media (max-width: 380px) {
  .h5-lottery-title h1 {
    font-size: 44px;
  }

  .h5-card-stage {
    padding: 10px;
  }

  .h5-card-grid {
    gap: 8px;
  }

  .h5-red-card {
    min-height: 74px;
  }
}

/* WeChat-clean skin for the merchant scan H5 */
body:has(.mobile) {
  color: #1f2329;
  background: #f6f8f7;
}

.mobile {
  min-height: 100vh;
  align-items: start;
  padding: max(12px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, #f7faf8 0%, #edf3f0 100%);
}

.phone-card {
  width: min(430px, 100%);
  min-height: calc(100vh - 30px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.member-entry-phone {
  top: 8px;
  right: 0;
}

.member-chip {
  min-height: 34px;
  padding: 4px 8px 4px 4px;
  border: 1px solid #edf0f2;
  background: rgba(255,255,255,.92);
  color: #1f2329;
  box-shadow: 0 8px 22px rgba(31,35,41,.06);
}

.member-chip img {
  width: 26px;
  height: 26px;
}

.member-chip span {
  max-width: 64px;
  color: #59636e;
  font-size: 12px;
}

.phone-hero {
  padding: 0;
  color: #1f2329;
  background: transparent;
}

.top-logo {
  min-height: 58px;
  margin-bottom: 22px;
  padding: 8px 102px 8px 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31,35,41,.06);
}

.top-logo img {
  width: 42px;
  height: 42px;
  border: 1px solid #edf0f2;
  border-radius: 12px;
  padding: 3px;
  background: #fff;
}

.top-logo strong {
  color: #1f2329;
  font-size: 17px;
  line-height: 1.2;
}

.top-logo span {
  display: block;
  margin-top: 2px;
  color: #8a9199;
  font-size: 12px;
  line-height: 1.35;
}

.phone-hero h1 {
  margin: 0;
  padding: 0 2px;
  color: #1f2329;
  font-size: clamp(34px, 10vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

.phone-hero p {
  margin: 12px 2px 0;
  color: #59636e;
  font-size: 14px;
  line-height: 1.65;
}

.phone-body {
  display: grid;
  gap: 14px;
  padding: 18px 0 0;
}

.merchant-info,
.form-block,
.draw-box,
.collection-box,
.result-box {
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31,35,41,.05);
}

.merchant-info {
  position: relative;
  margin: 0;
  padding: 16px;
  overflow: hidden;
}

.merchant-info::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #07c160;
}

.merchant-info h1 {
  margin-bottom: 6px;
  color: #1f2329;
  font-size: 22px;
  line-height: 1.25;
}

.merchant-info p {
  margin-bottom: 6px;
  color: #59636e;
  font-size: 13px;
  line-height: 1.55;
}

.merchant-info strong {
  color: #e94754;
}

.link {
  color: #07c160;
}

.form-block {
  padding: 16px;
}

.form-block h2 {
  color: #1f2329;
  font-size: 18px;
}

.form-note {
  margin-bottom: 14px;
  border-radius: 12px;
  background: #f7f8fa;
  color: #59636e;
  font-size: 13px;
}

.btn {
  min-height: 46px;
  border-radius: 12px;
  border-color: #edf0f2;
  background: #fff;
  color: #1f2329;
  font-weight: 900;
  box-shadow: none;
}

.btn:hover {
  transform: none;
  box-shadow: none;
}

.btn.primary {
  border-color: #07c160;
  background: #07c160;
  color: #fff;
}

.btn.primary:active {
  background: #06ad56;
}

.btn.big {
  min-height: 54px;
  font-size: 17px;
}

.rules-box {
  border-color: #edf0f2;
  border-radius: 12px;
  background: #fff;
}

.rules-box summary {
  color: #59636e;
}

.rules-box div {
  border-top-color: #edf0f2;
}

input {
  min-height: 46px;
  border-color: #edf0f2;
  border-radius: 12px;
  background: #f7f8fa;
}

input:focus {
  outline: 3px solid rgba(7,193,96,.12);
  border-color: #07c160;
  background: #fff;
}

.draw-box {
  padding: 16px;
}

.zodiac-stage {
  --radius: 116px;
  width: min(316px, 100%);
  margin-bottom: 16px;
  border: 0;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  box-shadow: inset 0 0 0 1px #edf0f2;
}

.zodiac-stage::before {
  background:
    radial-gradient(circle, rgba(7,193,96,.12), transparent 58%);
}

.zodiac-center {
  width: 82px;
  height: 82px;
  border: 1px solid #edf0f2;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31,35,41,.08);
}

.zodiac-center img {
  width: 64px;
  height: 64px;
}

.zodiac-card {
  border-color: #edf0f2;
  background: #fff;
  box-shadow: 0 8px 18px rgba(31,35,41,.06);
}

.zodiac-card::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent),
    #e94754;
}

.zodiac-card .name {
  color: #1f2329;
}

.zodiac-card.active {
  border-color: #07c160;
  box-shadow: 0 0 0 3px rgba(7,193,96,.13), 0 12px 24px rgba(7,193,96,.16);
}

.collection-box {
  padding: 14px;
}

.collection-title {
  color: #1f2329;
}

.collection-grid {
  gap: 8px;
}

.collection-item {
  border-color: #edf0f2;
  border-radius: 12px;
  background: #f7f8fa;
}

.collection-item.owned {
  border-color: rgba(7,193,96,.28);
  background: rgba(7,193,96,.08);
}

.collection-item small {
  color: #59636e;
}

.result-box {
  padding: 16px;
}

.result-box.win,
.result-box.lose {
  border: 0;
  background: #fff;
}

.result-box.win h2,
.result-box.lose h2 {
  color: #1f2329;
}

.result-highlight,
.phone-verify,
.ai-guide {
  border-color: #edf0f2;
  border-radius: 12px;
  background: #f7f8fa;
}

.result-highlight strong,
.code {
  color: #e94754;
}

.fine {
  color: #8a9199;
  font-size: 12px;
}

@media (max-width: 380px) {
  .top-logo {
    padding-right: 82px;
  }

  .phone-hero h1 {
    font-size: 32px;
  }

  .member-chip span {
    max-width: 46px;
  }

  .zodiac-stage {
    --radius: 108px;
  }
}

/* Festive frosted-glass theme */
:root {
  --bg: #2f0910;
  --paper: rgba(255, 250, 245, .72);
  --ink: #311519;
  --muted: #816367;
  --soft: rgba(255, 245, 236, .7);
  --line: rgba(255, 219, 182, .26);
  --red: #d62033;
  --red-deep: #8f0f20;
  --gold: #f0c56a;
  --gold-soft: rgba(255, 229, 174, .2);
  --blue: #8b2e3a;
  --green: #c98b27;
  --slate: #4a2329;
  --shadow: 0 24px 70px rgba(78, 10, 20, .24);
  --shadow-soft: 0 18px 42px rgba(78, 10, 20, .16);
  --radius: 24px;
}

html {
  background:
    radial-gradient(circle at top, rgba(255, 214, 139, .14), transparent 22%),
    linear-gradient(180deg, #521019 0%, #2f0910 52%, #23060c 100%);
}

body {
  position: relative;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 214, 139, .22), transparent 24%),
    radial-gradient(circle at 88% 6%, rgba(255, 255, 255, .08), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #70131f 0%, #440b14 40%, #23060c 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 216, 150, .14), transparent 18%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .08), transparent 16%),
    repeating-linear-gradient(90deg, rgba(255, 213, 153, .05) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(255, 213, 153, .045) 0 1px, transparent 1px 32px);
  opacity: .8;
}

body::after {
  inset: auto 0 0;
  height: 40vh;
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 203, 112, .16), transparent 42%),
    linear-gradient(180deg, transparent, rgba(20, 4, 8, .42));
}

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

.shell,
.shell.narrow,
.shell.consumer-shell {
  position: relative;
}

.topbar,
.consumer-topbar,
.asset-topbar,
.scan-topbar,
.bottom-nav {
  border: 1px solid rgba(255, 228, 196, .22);
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,248,242,.08));
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  box-shadow: 0 16px 36px rgba(33, 7, 12, .24);
}

.hero,
.panel,
.form-block,
.phone-card,
.today-card,
.ad-preview,
.ad-watch-card,
.stat,
.merchant-card,
.tip-item,
.tip-list li,
.progress-metrics div,
.benefit-grid div,
.mini-metrics div,
.rules-box,
.merchant-info,
.table-wrap,
.output,
.empty-state,
.result-box.win,
.result-box.lose,
.result-highlight,
.phone-verify,
.ai-guide {
  border: 1px solid rgba(255, 228, 196, .18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,247,240,.58)),
    rgba(255,255,255,.22);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 20px 48px rgba(49, 8, 16, .14);
}

.panel,
.form-block,
.merchant-card,
.phone-card,
.table-wrap,
.output,
.stat {
  border-radius: 24px;
}

.hero,
.guide-hero,
.ad-lottery-hero,
.phone-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 227, 189, .18);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 231, 173, .2), transparent 18%),
    radial-gradient(circle at 84% 10%, rgba(255,255,255,.14), transparent 18%),
    linear-gradient(135deg, rgba(120, 12, 28, .92), rgba(182, 26, 45, .88) 46%, rgba(240, 197, 106, .72)),
    rgba(94, 10, 22, .9);
  box-shadow: 0 28px 64px rgba(61, 6, 16, .3);
}

.hero::before,
.guide-hero::before,
.ad-lottery-hero::before,
.phone-hero::before,
.asset-hero::before,
.scan-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.08), transparent 32%),
    repeating-linear-gradient(45deg, rgba(255,226,182,.07) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.brand-row img,
.identity img,
.top-logo img,
.today-card-head img,
.mini-phone-head img {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,244,231,.92));
  border: 1px solid rgba(255, 225, 182, .36);
  box-shadow: 0 10px 22px rgba(55, 10, 17, .14);
}

.section-kicker,
.lottery-caption strong,
.result-highlight strong,
.code {
  color: var(--gold);
}

.identity strong,
.section-head h1,
.section-head h2,
.merchant-card h3,
.form-block h2,
.today-card-head strong,
table thead th {
  color: var(--ink);
}

.identity span,
.section-head span,
.section-head p,
.merchant-card .meta,
.form-note,
.tip-item,
.tip-list li,
.empty-state,
tbody td,
label,
.output {
  color: var(--muted);
}

.btn {
  border: 1px solid rgba(255, 224, 185, .24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,246,236,.68));
  box-shadow: 0 12px 30px rgba(70, 10, 18, .1);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(70, 10, 18, .16);
  border-color: rgba(255, 212, 156, .34);
}

.btn.primary {
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0)),
    linear-gradient(135deg, #e33147 0%, #b5162d 52%, #7f0c1c 100%);
  color: #fff8f2;
  border-color: rgba(255, 232, 196, .18);
  box-shadow: 0 18px 36px rgba(95, 9, 21, .28);
}

.btn.gold {
  background:
    linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0)),
    linear-gradient(135deg, #ffe6a8 0%, #f4c96d 48%, #d9982d 100%);
  color: #5a2e07;
  box-shadow: 0 18px 36px rgba(126, 62, 9, .18);
}

.btn.ghost {
  background: rgba(255,255,255,.1);
  color: #fff5ec;
  border-color: rgba(255, 230, 200, .26);
}

input,
select,
textarea {
  border: 1px solid rgba(255, 223, 183, .22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,247,240,.75));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(240, 197, 106, .18);
  border-color: rgba(224, 159, 46, .5);
}

.proof-card,
.benefit-grid div,
.mini-metrics div,
.progress-metrics div,
.stat,
.scan-points div,
.asset-proof div {
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.08)),
    rgba(255,255,255,.14);
  border-color: rgba(255, 226, 189, .2);
}

.merchant-card {
  overflow: hidden;
}

.merchant-card::after,
.panel::after,
.form-block::after,
.phone-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 24%, transparent 76%, rgba(255,222,173,.1));
}

.panel,
.form-block,
.phone-card,
.merchant-card {
  position: relative;
}

.merchant-tag,
.badge,
.location-badge,
.scan-badge,
.asset-hero small {
  border: 1px solid rgba(255, 226, 176, .24);
  background: linear-gradient(180deg, rgba(255,244,214,.24), rgba(255,224,166,.12));
  color: #ffe7b2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.merchant-tag {
  color: #8c5506;
  background: linear-gradient(180deg, rgba(255,242,208,.92), rgba(255,227,180,.78));
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

table thead th {
  background: linear-gradient(180deg, rgba(255,241,214,.92), rgba(255,228,188,.78));
  color: #6d3410;
  border-bottom-color: rgba(240, 197, 106, .24);
}

tbody tr {
  background: rgba(255,255,255,.38);
}

tbody tr:hover {
  background: rgba(255, 245, 232, .82);
}

.bottom-nav a:hover,
.scene-filter button.active,
.home-zodiac-grid.revealed .home-zodiac-tile.active .home-zodiac-front {
  box-shadow: 0 12px 28px rgba(95, 9, 21, .18);
}

.mobile {
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 214, 139, .24), transparent 22%),
    radial-gradient(circle at 86% 6%, rgba(255,255,255,.08), transparent 18%),
    linear-gradient(180deg, #5e0f1a 0%, #340811 44%, #22060c 100%);
}

.phone-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,247,241,.7)),
    rgba(255,255,255,.2);
}

.phone-hero,
.scan-hero {
  border-radius: 28px;
}

.merchant-info,
.rules-box,
.ad-preview,
.result-highlight,
.phone-verify,
.ai-guide {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,246,237,.72)),
    rgba(255,255,255,.22);
}

.output {
  color: #6a454a;
}

@media print {
  body::before,
  body::after,
  .panel::after,
  .form-block::after,
  .phone-card::after,
  .merchant-card::after {
    display: none !important;
  }
}
