:root {
  --red: #e10600;
  --blue: #1d4ed8;
  --ink: #222;
  --muted: #737880;
  --line: #a3afcc;
  --shadow: 0 4px 10px rgba(200, 220, 230, 0.72);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --brush: "STXingkai", "华文行楷", "KaiTi", "STKaiti", cursive;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; max-width: 100%; }
html {
  background: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  touch-action: manipulation;
}
button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
button, a { -webkit-user-select: none; user-select: none; }

.phone {
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.head h1 {
  margin: 0;
  min-width: 0;
  color: var(--red);
  font-size: clamp(18px, 6.4vw, 26px);
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 72px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn:active { background: #b10500; }

.banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: clamp(96px, 28vw, 124px);
  margin-top: 0;
  padding: 0 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 50%, #ffd56a 0%, transparent 42%),
    linear-gradient(100deg, #ff8a1e 0%, #ff3b14 46%, #ff5a12 100%);
}
.rays {
  position: absolute;
  inset: -60% -20%;
  background: repeating-conic-gradient(from 12deg at 30% 50%, rgba(255, 236, 180, 0.28) 0 7deg, transparent 7deg 16deg);
  pointer-events: none;
}
.stamp {
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(72px, 22vw, 92px);
  height: clamp(66px, 20vw, 84px);
  display: grid;
  place-items: center;
  align-content: center;
  color: #fff;
  text-align: center;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 0 4px rgba(180, 20, 0, 0.25);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(120, 0, 0, 0.18));
  transform: rotate(-3deg);
}
.stamp span, .stamp strong {
  display: block;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(120, 0, 0, 0.35);
}
.stamp span { font-size: clamp(14px, 4.4vw, 18px); }
.stamp strong { font-size: clamp(20px, 6.4vw, 26px); margin-top: 2px; }
.slogan { position: relative; z-index: 1; min-width: 0; }
.slogan p {
  margin: 0;
  font-family: var(--brush);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 1px;
}
.slogan .red {
  color: #d40000;
  font-size: clamp(26px, 9.2vw, 40px);
  -webkit-text-stroke: clamp(2px, 0.8vw, 4px) #fff;
  paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 rgba(120, 0, 0, 0.25));
}
.slogan .blue {
  margin-top: 2px;
  color: #1636d6;
  font-size: clamp(22px, 8.2vw, 36px);
  -webkit-text-stroke: clamp(2px, 0.8vw, 4px) #fff;
  paint-order: stroke fill;
}

.icon-card {
  width: calc(100% - 28px);
  margin: 14px auto 6px;
  padding: 12px 4px 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.icon-card button {
  border: 0;
  background: transparent;
  min-height: 64px;
  padding: 2px 0 0;
  color: var(--muted);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
}
.icon-card svg { width: clamp(34px, 10vw, 42px); height: clamp(34px, 10vw, 42px); }
.icon-card span { font-size: clamp(11px, 3.1vw, 13px); }
.icon-card button.is-on span { color: var(--red); font-weight: 700; }
.icon-card button.is-on svg { transform: translateY(-1px); }

.cat-panel {
  width: calc(100% - 28px);
  margin: 8px auto 0;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid #e6edf5;
}
.cat-panel p { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--red); }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: #445;
  font-size: 12px;
  box-shadow: 0 1px 0 rgba(200, 220, 230, 0.8);
}

.block { width: calc(100% - 28px); margin: 8px auto 0; }
.sec {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin: 8px 2px 10px;
}
.sec b { color: var(--red); font-size: 16px; font-style: italic; }
.sec-red { color: var(--red); font-style: normal; font-weight: 800; font-size: 16px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 8px 0 4px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.badge i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #f5a000;
  font-style: normal;
  font-size: 11px;
}
.badge.gold { background: linear-gradient(180deg, #ffc14d, #f39a00); }
.ball {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 35%, #7eb6ff, #1d4ed8 62%, #0b2f86);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.chevs {
  flex: 1;
  height: 16px;
  overflow: hidden;
  margin-left: 2px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 16px;
  white-space: nowrap;
  background: linear-gradient(90deg, #2563eb 0%, rgba(37, 99, 235, 0) 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.chevs:before { content: "››››››››››››››››››››››››"; }

.card {
  height: 68px;
  margin-bottom: 12px;
  padding: 0 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.card-blue {
  background: radial-gradient(ellipse at center, #fff 0%, #fbfcff 48%, #c5daf8 100%);
}
.lockup { display: flex; align-items: flex-end; gap: 2px; min-width: 0; }
.lockup .num {
  color: var(--red);
  font-size: clamp(26px, 8.4vw, 34px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  line-height: 0.9;
}
.lockup em {
  color: var(--red);
  font-style: italic;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}
.lockup.is-inline { align-items: flex-end; }
.lockup.is-inline em { font-size: 22px; margin-bottom: 1px; }
.side { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin: 0 0 2px 1px; }
.side .tag {
  padding: 1px 4px;
  border-radius: 3px;
  background: #18a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}
.side .blue {
  color: #2457e6;
  font-size: 16px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}
.lockup.is-wait .num {
  color: #3b82f6;
  font-size: clamp(20px, 6.4vw, 26px);
  letter-spacing: 1px;
}
.go {
  flex: 0 0 auto;
  width: 96px;
  min-height: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.go:active { background: #0049ff; }

.tips { width: calc(100% - 36px); margin: 18px auto 0; }
.tips h2 {
  margin: 0 0 10px;
  text-align: center;
  color: #555;
  font-size: 16px;
  font-weight: 500;
}
.tips ul { margin: 0; padding: 0; list-style: none; }
.tips li {
  position: relative;
  margin: 0 0 6px;
  padding-left: 12px;
  color: #9aa0a6;
  font-size: 12px;
  line-height: 1.65;
}
.tips li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #b0b6be;
}

.mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 18, 28, 0.46);
}
.mask[hidden] { display: none; }
.dialog {
  width: min(480px, 100%);
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.16);
}
.dialog h3 { margin: 0 0 8px; font-size: 18px; color: var(--red); }
.dialog p { margin: 0; color: #556; font-size: 14px; line-height: 1.6; }
.dialog-ok, .line-close, .line-app, .enter {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}
.dialog-ok {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  background: var(--red);
  color: #fff;
  font-size: 16px;
}

.line-box {
  width: min(480px, 100%);
  padding: 16px 14px calc(14px + env(safe-area-inset-bottom));
  border: 2px solid #ffe7b9;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: #b30101;
  color: #fff6e3;
  box-shadow: 0 -12px 40px rgba(80, 0, 0, 0.28);
}
.line-tip { margin: 0 0 10px; text-align: center; font-size: 13px; }
.line-app, .line-close {
  width: 100%;
  height: 44px;
  background: #ffe7b9;
  color: #7c0501;
  font-size: 15px;
}
.line-row {
  display: grid;
  grid-template-columns: 64px 1fr 72px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.line-row b, .line-row span {
  height: 32px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #222;
  font-size: 13px;
}
.enter {
  height: 36px;
  background: #ffe7b9;
  color: #7c0501;
  font-size: 13px;
}
.line-close { margin-top: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 50;
  transform: translateX(-50%) translateY(12px);
  width: max-content;
  max-width: min(420px, calc(100% - 32px));
  text-align: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(20, 24, 32, 0.92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loading {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
}
.loading[hidden] { display: none; }
.loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 120px;
  padding: 22px 18px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
}
.loading-card p { margin: 0; color: #667; font-size: 14px; }
.spin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #e6e8ee;
  border-top-color: var(--red);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 520px) {
  html { background: #e9edf2; }
  .phone {
    width: 430px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(15, 23, 42, 0.08);
  }
  .dialog, .line-box { width: 430px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
