:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --border: #e4e4e7;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --primary-grad: linear-gradient(135deg, #d92626 0%, #ef4444 55%, #f59e0b 100%);
  --radius: 14px;
  --nav-h: calc(64px + env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: #e5e7eb;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.mobile-app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
}

.mobile-app.hide-top-header .app-header {
  display: none;
}

/* 顶部 */
.app-header {
  background: var(--primary-grad);
  color: #fff;
  padding: 13px 14px 11px;
  position: sticky;
  top: 0;
  z-index: 25;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.3px;
}

.brand-wish {
  font-size: 12px;
  font-weight: 600;
  color: #fef08a;
  margin-left: 2px;
}

.brand-sub {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.chip-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.draw-banner {
  margin-top: 9px;
  background: rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.draw-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.draw-banner-lbl {
  font-weight: 800;
  white-space: nowrap;
}

.draw-banner-date {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  white-space: nowrap;
}

.draw-banner-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.draw-mini-pill {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.draw-mini-pill.major {
  background: rgba(255, 255, 255, 0.95);
  color: #b91c1c;
}

/* 主内容 */
.app-main {
  flex: 1;
  padding: 12px 12px calc(32px + var(--nav-h));
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
}

.card-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* 按钮与输入 */
.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-amber {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.btn-soft {
  background: #f4f4f5;
  border-color: #e4e4e7;
  color: #27272a;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.text-input {
  width: 100%;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
}

.text-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.num-input {
  width: 54px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  padding: 4px 5px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.mini-select {
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

.mini-hint {
  font-size: 11px;
  color: var(--muted);
}

/* 首页黄金最新活动横幅 */
.home-act-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef2f2 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}

.home-act-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.home-act-badge {
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.home-act-title {
  font-size: 13px;
  font-weight: 800;
  color: #9a3412;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-act-arrow {
  font-size: 12px;
  font-weight: 700;
  color: #d97706;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==================== TAB 1: 每日开奖 ==================== */
.draws-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.draw-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
}

.draw-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.draw-game-name {
  font-size: 15px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.draw-issue {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.pool-pill {
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.draw-balls-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.draw-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.draw-history-box {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f4f4f5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.draw-hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.hist-nums {
  font-family: Consolas, monospace;
  font-weight: 700;
  color: #18181b;
}

/* ==================== TAB 2: 竞彩算奖 ==================== */
.jc-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.single-tag {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  margin: 0 2px;
  line-height: 15px;
}

.jc-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: calc(170px + var(--nav-h));
}

.jc-offhours-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 8px 10px;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

.jc-offhours-bar strong {
  color: #78350f;
}

.jc-date-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
}

.jc-date-divider.next-day {
  margin-top: 12px;
}

.jc-date-divider::before,
.jc-date-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.25), #dc2626);
  border-radius: 2px;
}

.jc-date-divider::after {
  background: linear-gradient(90deg, #dc2626, rgba(220, 38, 38, 0.25));
}

.jc-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dc2626;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.22);
}

.jc-date-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fde047;
  flex-shrink: 0;
}

.jc-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
}

.jc-compact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.jc-top-stack-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  flex-shrink: 0;
}

.jc-top-stack-left .jc-match-num {
  font-size: 11px;
  font-weight: 800;
  color: #3f3f46;
  white-space: nowrap;
}

.jc-lg-mini {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.jc-top-teams {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jc-top-stack-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.jc-dt-date {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.jc-dt-time {
  font-size: 10.5px;
  font-weight: 700;
  color: #52525b;
  white-space: nowrap;
}

.jc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 8px;
}

.jc-match-num {
  font-weight: 800;
  color: #3f3f46;
}

.jc-league {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
}

.jc-teams {
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.jc-vs {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.jc-team-tag {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.jc-odds-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 6px;
}

.jc-line-badge {
  background: #f4f4f5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #52525b;
  padding: 3px 2px;
  line-height: 1.2;
}

.jc-line-badge.neg {
  background: #fef2f2;
  color: #dc2626;
}

.jc-line-badge.pos {
  background: #f0fdf4;
  color: #15803d;
}

.jc-btn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.jc-btn-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.jc-btn-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.jc-btn-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.jc-sub-label {
  font-size: 11px;
  font-weight: 800;
  color: #52525b;
  margin: 7px 0 4px;
}

.odd-btn.compact {
  padding: 5px 2px;
}

.odd-btn.compact .odd-lbl {
  font-size: 11px;
}

.odd-btn.compact .odd-sp {
  font-size: 10px;
}

.odd-btn {
  border: 1px solid #e4e4e7;
  background: #fafafa;
  border-radius: 8px;
  padding: 6px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  transition: all 0.12s;
}

.odd-btn .odd-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #27272a;
}

.odd-btn .odd-sp {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.odd-btn.selected {
  background: var(--red);
  border-color: var(--red);
}

.odd-btn.selected .odd-lbl,
.odd-btn.selected .odd-sp {
  color: #fff;
}

.jc-more-toggle {
  text-align: center;
  margin-top: 4px;
}

/* 竞彩悬浮底部算奖条 */
.jc-slip-bar {
  position: fixed;
  bottom: var(--nav-h);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 2px solid var(--red);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
  padding: 6px 11px 7px;
  z-index: 28;
}

.jc-slip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.jc-slip-top > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jc-slip-top > .link-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.jc-pass-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.jc-pass-row::-webkit-scrollbar {
  display: none;
}

.pass-chip {
  flex: 0 0 auto;
  border: 1px solid #d4d4d8;
  background: #f4f4f5;
  color: #3f3f46;
  padding: 2px 9px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.pass-chip.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.jc-slip-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.jc-slip-bottom .btn {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 9px;
}

.jc-slip-bar .num-input {
  width: 44px;
  padding: 2px 4px;
  font-size: 12px;
}

.jc-slip-calc {
  flex: 1;
  min-width: 0;
}

.jc-money-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.jc-money-val {
  font-size: 16px;
  font-weight: 900;
  color: var(--red);
}

.jc-payout-line {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 彩种胶囊 & 分段 ==================== */
.lottery-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.lottery-tabs::-webkit-scrollbar {
  display: none;
}

.lottery-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.lottery-grid-4 .game-pill {
  padding: 7px 4px;
  text-align: center;
  width: 100%;
}

/* 大乐透官方套餐票卡片 */
.pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 11px;
}

.pkg-card {
  border: 1.5px solid var(--border);
  background: #fafafa;
  border-radius: 11px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.14s;
}

.pkg-card.active {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.14);
}

.pkg-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--red);
}

.pkg-desc {
  font-size: 11px;
  color: #3f3f46;
  font-weight: 700;
  margin-top: 3px;
}

.pkg-bets {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.game-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: #fff;
  color: #3f3f46;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.game-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.segment-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  background: #e4e4e7;
  padding: 3px;
  border-radius: 10px;
  margin-bottom: 11px;
}

.segment-wrap.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.segment-wrap.cols-3 .seg-btn {
  font-size: 12px;
  padding: 6px 4px;
}

.segment-wrap.cols-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.segment-wrap.cols-4 .seg-btn {
  font-size: 12px;
  padding: 6px 2px;
  white-space: nowrap;
}

/* 传统足彩专用样式 */
.ctzc-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ctzc-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.ctzc-rule-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.ctzc-draw-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 9px;
  font-size: 12px;
}

.ctzc-draw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
}

.ctzc-draw-one-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.ctzc-res-inline {
  font-family: Consolas, monospace;
  color: var(--red);
  letter-spacing: 1px;
}

.ctzc-draw-toggle {
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ctzc-r9-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 6px;
  align-items: stretch;
}

.ctzc-dan-btn {
  border: 1px solid #d4d4d8;
  background: #fafafa;
  color: #52525b;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctzc-dan-btn.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}

.ctzc-slot-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 6px;
}

.ctzc-slot-row:last-child {
  margin-bottom: 0;
}

.ctzc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.ctzc-top-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ctzc-num {
  font-size: 11px;
  font-weight: 800;
  color: #52525b;
  white-space: nowrap;
}

.ctzc-lg {
  background: #0f766e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.ctzc-top-teams {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctzc-vs {
  font-size: 11px;
  font-weight: 700;
  color: #a1a1aa;
  margin: 0 3px;
}

.ctzc-top-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==================== 刮刮乐现货图鉴 ==================== */
.scratch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scratch-card {
  background: #fff;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.14s;
}

.scratch-card:active {
  transform: scale(0.98);
}

.scratch-card.soldout {
  opacity: 0.6;
}

.scratch-cover {
  height: 118px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}

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

.scratch-cover-price {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scratch-cover-brand {
  font-size: 11px;
  opacity: 0.92;
  margin-top: 5px;
  background: rgba(0, 0, 0, 0.18);
  padding: 2px 8px;
  border-radius: 10px;
}

.scratch-status-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sc-st-new { background: #7c3aed; color: #fff; }
.sc-st-fresh { background: #0d9488; color: #fff; }
.sc-st-promo { background: #ea580c; color: #fff; }
.sc-st-restock { background: #0284c7; color: #fff; }
.sc-st-gift { background: #db2777; color: #fff; }
.sc-st-hot { background: #dc2626; color: #fff; }
.sc-st-instock { background: #2563eb; color: #fff; }
.sc-st-box { background: #15803d; color: #fff; }
.sc-st-low { background: #d97706; color: #fff; }
.sc-st-soldout { background: #52525b; color: #fff; }

.brand-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  margin-right: 4px;
  vertical-align: middle;
}

.brand-tc { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.brand-fc { background: #fef2f2; color: #be123c; border: 1px solid #fecdd3; }

.scratch-body {
  padding: 9px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.scratch-name {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 3px;
}

.scratch-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 4px;
}

.scratch-desc {
  font-size: 11px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== 竞彩方案参考卡片 ==================== */
.plan-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 13px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.plan-title {
  font-size: 14px;
  font-weight: 800;
}

.plan-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.plan-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
}

.plan-st-pending { background: #eff6ff; color: #2563eb; }
.plan-st-hit { background: #dcfce7; color: #15803d; }
.plan-st-miss { background: #f4f4f5; color: #71717a; }

.plan-match-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-match-item {
  font-size: 12px;
  border-bottom: 1px dashed #e4e4e7;
  padding-bottom: 6px;
}

.plan-match-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.plan-pick-hl {
  color: var(--red);
  font-weight: 800;
  margin-top: 2px;
}

.plan-analysis {
  font-size: 12px;
  color: #3f3f46;
  background: #fffbeb;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.note-img-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.note-img-item {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  cursor: pointer;
}

.segment-wrap.compact {
  margin-bottom: 8px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #52525b;
  cursor: pointer;
}

.seg-btn.active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 彩球 */
.ball {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  user-select: none;
  flex-shrink: 0;
}

.ball-sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.ball-red {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  color: #fff;
}

.ball-blue {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #fff;
}

.ball-dan {
  background: linear-gradient(145deg, #f59e0b, #d97706) !important;
  color: #fff !important;
}

.ball-hit {
  box-shadow: 0 0 0 2px #facc15;
  transform: scale(1.06);
}

.ball-lucky {
  box-shadow: 0 0 0 2.5px #f59e0b, 0 2px 6px rgba(245, 158, 11, 0.4);
}

.ball-miss {
  background: #e4e4e7;
  color: #71717a;
}

.ball-plus {
  color: var(--muted);
  font-weight: 800;
  margin: 0 2px;
}

/* 选号机选与球盘 */
.lucky-seed-row {
  margin-bottom: 9px;
}

.lucky-lock-preview {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #b45309;
  font-weight: 700;
}

.quick-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 11px;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-row {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.ticket-idx {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-right: 2px;
}

.icon-action {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.quick-footer {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-summary {
  font-size: 13px;
  font-weight: 800;
  color: var(--red);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 22px 12px;
  font-size: 13px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f4f4f5;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.toggle-chip.active-chip {
  background: var(--amber-soft);
  color: #92400e;
  border: 1px solid #fde68a;
}

.tip-box {
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 10px;
}

.zone-section {
  margin-bottom: 11px;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
}

.ball-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.ball-grid.cols-10 {
  grid-template-columns: repeat(5, 1fr);
}

.ball-grid.cols-8 {
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.pick-ball {
  height: 35px;
  border-radius: 50%;
  border: 1.5px solid #e4e4e7;
  background: #fff;
  color: #27272a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pick-ball.sm {
  height: 30px;
  font-size: 12px;
}

.pick-ball.sel-red { background: var(--red); border-color: var(--red); color: #fff; }
.pick-ball.sel-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.pick-ball.sel-dan { background: #f59e0b; border-color: #d97706; color: #fff; }
.pick-ball.is-disabled {
  background: #f4f4f5;
  border-color: #e4e4e7;
  color: #a1a1aa;
  opacity: 0.55;
}

.dan-tag { font-size: 9px; font-weight: 800; }

.calc-result-bar {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-nums {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.calc-money {
  font-size: 20px;
  font-weight: 900;
  color: var(--red);
}

.calc-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}

/* 算奖 */
.check-options-row { margin-bottom: 10px; }

.step-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  margin-bottom: 10px;
}

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.step-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.mini-board {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.parsed-preview {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.dt-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}

.check-submit-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prize-result {
  margin-top: 13px;
  border-radius: 12px;
  padding: 13px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.prize-result.no-win {
  border-color: var(--border);
  background: #fafafa;
}

.prize-hero {
  text-align: center;
  margin-bottom: 10px;
}

.prize-hero-label { font-size: 12px; color: var(--muted); }
.prize-hero-amt { font-size: 26px; font-weight: 900; color: var(--red); line-height: 1.25; }

.prize-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.prize-table th,
.prize-table td {
  padding: 6px 5px;
  border-bottom: 1px solid #e4e4e7;
  text-align: left;
}

/* 守号本 & 门店 */
.keep-list { display: flex; flex-direction: column; gap: 10px; }

.keep-item {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
}

.keep-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  font-size: 12px;
}

.keep-badge {
  background: var(--red-soft);
  color: var(--red);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
}

.keep-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  justify-content: flex-end;
}

.check-issue-head {
  align-items: center;
  gap: 8px;
}

.check-issue-select {
  flex: 1;
  min-width: 0;
  max-width: 225px;
  border: 1.5px solid var(--red);
  background: #ffffff;
  color: var(--text);
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.check-rule-banner {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.check-rule-banner.normal {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.check-rule-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

.check-rule-banner.normal .check-rule-dot {
  background: #64748b;
}

.icp-footer {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
  padding-bottom: 4px;
}

.icp-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.check-zone-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-input-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.check-ball-guide {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--red);
  white-space: nowrap;
  cursor: pointer;
}

.check-guide-arrow {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.keep-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.keep-card-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
}

.keep-title-bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.keep-sub-bar {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.schedule-card {
  padding-left: 9px;
  padding-right: 9px;
}

.sched-today-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #fca5a5;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}

.sched-day {
  min-width: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sched-day.today { background: var(--red-soft); border-color: var(--red); }
.sched-day.today .sched-wk { color: var(--red); }
.sched-wk { font-size: clamp(10px, 2.8vw, 11.5px); font-weight: 800; margin-bottom: 1px; color: #1e293b; white-space: nowrap; }
.sched-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.sched-sep {
  height: 1px;
  background: #e2e8f0;
  margin: 2px 3px;
}
.sched-bot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sched-tag {
  display: block;
  width: 100%;
  font-size: clamp(8.5px, 2.55vw, 10.5px);
  line-height: 1.25;
  border-radius: 5px;
  padding: 3px 0;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.sched-dlt { background: #fee2e2; color: #b91c1c; }
.sched-ssq { background: #dbeafe; color: #1d4ed8; }
.sched-qxc { background: #fef3c7; color: #92400e; }
.sched-qlc { background: #f3e8ff; color: #7e22ce; }
.sched-kl8 { background: #dcfce7; color: #15803d; }
.sched-fc3d { background: #fff1f2; color: #be123c; font-size: clamp(8px, 2.25vw, 10px); letter-spacing: -0.5px; }
.sched-pl3 { background: #ffedd5; color: #c2410c; }
.sched-pl5 { background: #e0f2fe; color: #0369a1; }

.shop-hero-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 70%);
  border: 1px solid #fed7aa;
}

.shop-hero-title { font-size: 18px; font-weight: 900; color: #9a3412; margin-bottom: 10px; }
.shop-meta-list { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.shop-wx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #fed7aa;
}

.shop-qr-box {
  margin-top: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px dashed #fdba74;
  border-radius: 12px;
  text-align: center;
}

.shop-qr-img {
  width: 184px;
  height: 184px;
  object-fit: contain;
  border-radius: 10px;
  padding: 6px;
  background: #fff;
  border: 1px solid #f1f5f9;
  display: inline-block;
}

.shop-qr-tip {
  font-size: 12px;
  color: #9a3412;
  margin-top: 6px;
}

.promo-list { display: flex; flex-direction: column; gap: 9px; }
.promo-card { background: var(--amber-soft); border: 1px solid #fde68a; border-radius: 11px; padding: 11px; }
.promo-badge { display: inline-block; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-bottom: 4px; }
.promo-title { font-weight: 800; font-size: 14px; color: #78350f; }
.promo-desc { font-size: 12px; color: #92400e; margin-top: 3px; }

.print-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.print-price-item { background: #fafafa; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.pp-name { font-weight: 700; font-size: 13px; }
.pp-price { font-size: 16px; font-weight: 900; color: var(--red); margin-top: 3px; }
.pp-tag { display: inline-block; font-size: 10px; color: var(--muted); }

.compliance-note {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 0 8px;
}

/* 底部 5 栏导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
}

.bnav-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
}

.bnav-ico { font-size: 18px; line-height: 1.1; }
.bnav-btn.active { color: var(--red); }

/* 弹窗与 Toast */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.modal-x { border: none; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; }
.modal-content { padding: 14px 16px 18px; overflow-y: auto; }
.poster-img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.poster-tip {
  text-align: center;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}

.toast-box {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--nav-h));
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
}

.toast-item {
  background: rgba(24, 24, 27, 0.92);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  white-space: nowrap;
}

/* ==================== 活动详情弹窗独立卡片分隔 ==================== */
.act-modal-summary {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 12px;
  text-align: center;
}

.act-detail-list {
  background: #f1f5f9;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}

.act-detail-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 3.5px solid #dc2626;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.act-detail-card + .act-detail-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.act-detail-divider::before,
.act-detail-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #cbd5e1;
}

.act-detail-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.act-idx-pill {
  background: #1e293b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.act-detail-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
}

.act-detail-period {
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 4px 8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.act-detail-body {
  font-size: 13px;
  color: #3f3f46;
  white-space: pre-line;
  line-height: 1.72;
}
