/* ============================================================
   全局样式 / Global styles
   主色 / Palette:
     --pitch   球场深绿 deep pitch green   #0F3D2E
     --turf    草地绿   turf green         #1F7A4D
     --gold    奖杯金   trophy gold        #F2B632
     --gold-d  深金(白底上的价格色)        #A86F0A
     --paper   页面底色 page background    #F3F5F1
     --ink     正文黑   text               #14211B
     --alert   售罄红   sold-out red       #C8412F
   ============================================================ */
:root {
  --pitch: #0F3D2E;
  --turf: #1F7A4D;
  --gold: #F2B632;
  --gold-d: #A86F0A;
  --paper: #F3F5F1;
  --ink: #14211B;
  --muted: #5F6F66;
  --line: #DDE3DC;
  --alert: #C8412F;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; } /* prevent any horizontal overflow on mobile */
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  background-color: #ecf3ec;
  background-image:
    radial-gradient(circle at 50% 18%, transparent 280px, rgba(31, 122, 77, 0.10) 280px, rgba(31, 122, 77, 0.10) 282px, transparent 282px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(31, 122, 77, 0.07) calc(50% - 1px), rgba(31, 122, 77, 0.07) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(0deg, #eaf2e8 0px, #eaf2e8 56px, #dde8d6 56px, #dde8d6 112px);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ---------- Header ---------- */
header {
  background: linear-gradient(180deg, var(--pitch) 0%, #0a2c20 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: 0;
  bottom: 0;
  width: 280px;
  background:
    radial-gradient(circle at 80% 50%, transparent 38px, rgba(255,255,255,0.08) 38px, rgba(255,255,255,0.08) 40px, transparent 40px),
    linear-gradient(90deg, transparent 40px, rgba(255,255,255,0.06) 40px, rgba(255,255,255,0.06) 42px, transparent 42px);
  pointer-events: none;
}
header h1 { margin: 0; font-size: 20px; letter-spacing: .5px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; min-width: 0; }
.brand-logo { height: 40px; width: 40px; object-fit: contain; border-radius: 8px; flex: 0 0 auto; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .3px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#userBar { font-size: 13px; color: #cfe3d8; position: relative; z-index: 1; }

/* ---------- Nav ---------- */
nav { display: flex; gap: 6px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
nav button { flex: none; padding: 8px 14px; margin: 0; border: none; background: transparent; color: var(--muted); border-radius: 999px; cursor: pointer; font-size: 14px; }
nav button:hover { background: #eaf2ec; color: var(--pitch); }
nav button.active { background: var(--pitch); color: #fff; }

/* ---------- PWA Install Banner ---------- */
.pwa-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(135deg, #057a36, #0a9e4a); color: #fff; font-size: 13px; }
.pwa-banner #pwaInstallText { flex: 1; line-height: 1.4; }
.pwa-install-btn { flex: none; padding: 7px 16px; background: #fff; color: var(--pitch); border: none; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pwa-dismiss-btn { flex: none; width: 28px; height: 28px; background: rgba(255,255,255,.2); color: #fff; border: none; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }

main { padding: 18px 16px; max-width: 860px; margin: 0 auto; }
.tab-panel { display: none; padding: 6px 0; }
.tab-panel.active { display: block; }
.tab-panel > h2 { margin: 10px 0 16px; font-size: 20px; }

/* ---------- Forms, buttons, cards ---------- */
input { display: block; width: 100%; margin: 8px 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; }
input:focus { outline: 2px solid var(--turf); outline-offset: 1px; }
button { padding: 9px 16px; margin: 4px 4px 4px 0; border-radius: 8px; border: 1px solid var(--turf); background: var(--turf); color: #fff; cursor: pointer; font-size: 14px; }
button:hover:not(:disabled) { background: #186540; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:disabled { background: #d5dbd6; border-color: #d5dbd6; color: #7b877f; cursor: not-allowed; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: -14px;
  right: -14px;
  width: 60px;
  height: 60px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='44' fill='none' stroke='%23dde3dc' stroke-width='2'/><polygon points='50,28 64,40 58,58 42,58 36,40' fill='%23dde3dc'/><path d='M50 28 L50 12 M64 40 L82 30 M58 58 L74 76 M42 58 L26 76 M36 40 L18 30' stroke='%23dde3dc' stroke-width='2' fill='none'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Schedule ---------- */
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.league-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 8px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.league-card::after {
  content: "";
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 50px;
  height: 50px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='42' fill='none' stroke='%231F7A4D' stroke-width='2.5'/><polygon points='50,28 64,40 58,58 42,58 36,40' fill='%231F7A4D'/><path d='M50 28 L50 12 M64 40 L82 30 M58 58 L74 76 M42 58 L26 76 M36 40 L18 30' stroke='%231F7A4D' stroke-width='2' fill='none'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.15;
  pointer-events: none;
}
.league-card:hover { border-color: var(--turf); background: #f1f8f3; }
.league-icon { font-size: 28px; }
.league-name { margin-top: 6px; font-size: 14px; font-weight: 600; }
.breadcrumb { margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.linklike { background: none; border: none; color: var(--turf); padding: 0; margin: 0; cursor: pointer; text-decoration: underline; }
.linklike:hover:not(:disabled) { background: none; color: var(--pitch); }
.match-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.match-recent { border-left: 3px solid var(--gold); background: #fffcf5; }
.match-score { font-size: 18px; font-weight: 700; color: #333; }
.match-score-recent { font-size: 22px; font-weight: 800; color: var(--gold-d); }
.match-ft { font-size: 13px; color: var(--muted); font-weight: 600; }

.match-filter-btn { padding: 6px 14px; border: 1px solid var(--line); background: #fff; border-radius: 20px; font-size: 13px; color: var(--muted); cursor: pointer; transition: all .15s; }
.match-filter-btn:hover { border-color: var(--turf); color: var(--turf); }
.match-filter-btn.active { background: var(--turf); color: #fff; border-color: var(--turf); }

.eat-reminder { font-size: 12px; color: var(--muted); margin-left: 4px; white-space: nowrap; }

/* ---------- Points Store ---------- */
.points-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.points-card { position: relative; overflow: hidden; background: var(--pitch); color: #fff; border-radius: 14px; padding: 16px 16px 14px; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.points-card::after { content: ""; position: absolute; right: -28px; bottom: -28px; width: 96px; height: 96px; border-radius: 50%; border: 2px solid rgba(255,255,255,.14); }
.points-card:hover { background: #124a37; }
.points-card.active { border-color: var(--gold); }
.points-card-title { font-size: 13px; color: #bfd8cb; }
.points-card-balance { font-size: 30px; font-weight: 800; color: var(--gold); margin-top: 6px; line-height: 1.1; }
.points-card-unit { font-size: 12px; color: #bfd8cb; margin-left: 4px; font-weight: 400; }
.store-hint { font-size: 12px; color: var(--muted); margin: 8px 2px 0; }
.store-list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; }
.store-list-head h3 { margin: 0; font-size: 17px; }
.store-list-head span { font-size: 12px; color: var(--muted); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.product { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.product.soldout .product-img { filter: grayscale(1); opacity: .55; }
.product-img { position: relative; aspect-ratio: 1 / 1; background: #e9efe9; overflow: hidden; }
.product-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-img-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #7a8f83; font-size: 12px; text-align: center; padding: 8px; background: repeating-linear-gradient(90deg, #e6eee7 0 28px, #dfe9e1 28px 56px); }
.product-img-ph b { font-size: 26px; font-weight: 400; }
.product-tag { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--turf); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.product-tag.both { background: var(--gold); color: #3a2a00; }
.product-soldout-mask { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; }
.product-soldout-mask span { background: rgba(20,33,27,.78); color: #fff; padding: 5px 14px; border-radius: 999px; font-size: 13px; }
.product-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-name { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.product-desc { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.product-price { font-size: 24px; font-weight: 800; color: var(--gold-d); margin-top: 4px; }
.product-price small { font-size: 13px; font-weight: 600; color: var(--gold-d); margin-left: 4px; }
.product-stock { font-size: 12px; color: var(--alert); font-weight: 600; }
.product-stock.low { color: var(--alert); }
.product-actions { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.product-actions button { width: 100%; margin: 0; padding: 11px 8px; font-size: 15px; font-weight: 600; }
.product-actions button.alt { background: #fff; color: var(--turf); }
.product-actions button.alt:hover:not(:disabled) { background: #eaf4ee; }
.empty-tip { color: var(--muted); text-align: center; padding: 28px 0; }

/* ---------- Check-in (Profile) & Lottery (Store) ---------- */
/* Check-in card in profile — full width, horizontal layout */
.profile-checkin-card {
  background: linear-gradient(135deg, #f0f8f3 0%, #fff 100%);
  border: 1.5px solid #c7e4d5; border-radius: 14px; padding: 16px 18px;
  margin: 16px 0; position: relative; overflow: hidden;
}
.profile-checkin-card::after {
  content: ""; position: absolute; bottom: -20px; right: -20px; width: 80px; height: 80px;
  border-radius: 50%; border: 2px solid rgba(31,122,77,0.06); pointer-events: none;
}
.checkin-card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkin-card-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.checkin-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.checkin-icon { font-size: 32px; }
.checkin-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.checkin-streak { font-size: 12px; color: var(--muted); margin-top: 2px; }
.checkin-streak b { color: var(--turf); }
.checkin-reward { font-size: 18px; font-weight: 800; color: var(--gold-d); white-space: nowrap; }
.checkin-bonus-hint { font-size: 12px; color: var(--gold-d); font-weight: 600; margin-top: 10px; text-align: center; }

/* WhatsApp 频道卡片 / WhatsApp channel card */
.wa-channel-card {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: none; border-radius: 14px; padding: 16px 18px;
  margin: 12px 0; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 12px rgba(37, 211, 102, 0.25);
}
.wa-channel-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35); }
.wa-channel-card:active { transform: translateY(0); }
.wa-channel-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.wa-channel-icon {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.wa-channel-icon svg { width: 22px; height: 22px; fill: #fff; }
.wa-channel-info { flex: 1; min-width: 0; }
.wa-channel-title { font-size: 15px; font-weight: 700; color: #fff; }
.wa-channel-sub { font-size: 12px; color: rgba(255,255,255,0.85); margin-top: 2px; }
.wa-channel-arrow { color: rgba(255,255,255,0.9); font-size: 20px; flex: none; font-weight: 700; }
.wa-channel-card::after {
  content: ""; position: absolute; top: -15px; right: -15px; width: 60px; height: 60px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.12); pointer-events: none;
}

/* WhatsApp 频道卡片 — 已领取状态 */
.wa-channel-card.wa-channel-claimed {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}
.wa-channel-card.wa-channel-claimed .wa-channel-title { color: #2e7d32; }
.wa-channel-card.wa-channel-claimed .wa-channel-sub { color: #4caf50; }
.wa-channel-card.wa-channel-claimed .wa-channel-icon { background: rgba(76, 175, 80, 0.2); }
.wa-channel-card.wa-channel-claimed .wa-channel-icon svg { fill: #2e7d32; }
.wa-channel-check {
  width: 28px; height: 28px; border-radius: 50%; background: #4caf50; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex: none;
}
.wa-channel-badge {
  flex: none; padding: 6px 14px; background: rgba(255,255,255,0.25); color: #fff;
  border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* WhatsApp 频道关注确认弹窗 */
.wa-channel-modal-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; transition: opacity .2s ease;
}
.wa-channel-modal-overlay.show { opacity: 1; }
.wa-channel-modal {
  background: #fff; border-radius: 16px; max-width: 360px; width: 100%;
  padding: 32px 24px 20px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: scale(0.9); transition: transform .25s ease;
}
.wa-channel-modal-overlay.show .wa-channel-modal { transform: scale(1); }
.wa-channel-modal-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}
.wa-channel-modal-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #14211B; }
.wa-channel-modal-desc { margin: 0 0 20px; font-size: 14px; color: #5F6F66; line-height: 1.5; }
.wa-channel-modal-desc b { color: #1F7A4D; }
.wa-channel-modal-actions { display: flex; gap: 10px; }
.wa-modal-btn { flex: 1; padding: 12px; font-size: 15px; font-weight: 600; border-radius: 10px; border: none; cursor: pointer; }
.wa-modal-cancel { background: #f0f3ee; color: #5F6F66; border: 1px solid #DDE3DC; }
.wa-modal-cancel:hover { background: #e6ebe4; }
.wa-modal-confirm { background: #25D366; color: #fff; }
.wa-modal-confirm:hover:not(:disabled) { background: #20bd5a; }
.wa-modal-confirm:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-checkin {
  padding: 8px 18px; font-size: 14px; font-weight: 700; border-radius: 8px;
  background: var(--turf); color: #fff; border: none; cursor: pointer; white-space: nowrap;
}
.btn-checkin:hover:not(:disabled) { background: #186540; }
.btn-checkin.done { background: #e6f4ea; color: var(--turf); border: 1px solid var(--turf); cursor: default; }

/* Lottery card — full width in store */
.lottery-card-full {
  background: linear-gradient(135deg, #fff9ed 0%, #fff 100%);
  border: 1.5px solid #f5d9a8; border-radius: 14px; padding: 18px 16px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 20px; position: relative; overflow: hidden;
}
.lottery-card-full::after {
  content: ""; position: absolute; bottom: -20px; right: -20px; width: 80px; height: 80px;
  border-radius: 50%; border: 2px solid rgba(242,182,50,0.12); pointer-events: none;
}
.lottery-card-full .lottery-icon { font-size: 36px; margin-bottom: 2px; }
.lottery-card-full .lottery-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.lottery-card-full .lottery-cost { font-size: 13px; color: var(--muted); }
.lottery-card-full .lottery-cost b { color: var(--gold-d); font-size: 16px; }
.lottery-card-full .lottery-balance { font-size: 12px; color: var(--muted); }
.lottery-card-full .lottery-balance b { color: var(--ink); }
.lottery-card-full .lottery-prizes { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; width: 100%; margin: 6px 0; }
.lottery-card-full .lottery-prize-item { flex: 0 0 auto; }
.lottery-card-full .btn-lottery {
  margin-top: 8px; padding: 12px 24px; font-size: 16px; font-weight: 700; border-radius: 10px;
  background: var(--gold); color: #3a2a00; border: none; cursor: pointer; width: 100%;
}
.lottery-card-full .btn-lottery:hover:not(:disabled) { background: #e0a420; }
.lottery-card-full .btn-lottery:disabled { opacity: 0.5; cursor: not-allowed; }
.lottery-card-full .lottery-history { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lottery-card-full .lottery-desc { font-size: 13px; color: var(--muted); }

/* Lottery card for not-logged-in (compact) */
.lottery-card {
  background: linear-gradient(135deg, #fff9ed 0%, #fff 100%);
  border: 1.5px solid #f5d9a8; border-radius: 14px; padding: 18px 16px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 20px;
}
.lottery-card .lottery-icon { font-size: 36px; }
.lottery-card .lottery-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.lottery-card .lottery-desc { font-size: 13px; color: var(--muted); }
.lottery-card .btn-lottery {
  margin-top: 8px; padding: 12px 24px; font-size: 16px; font-weight: 700; border-radius: 10px;
  background: var(--gold); color: #3a2a00; border: none; cursor: pointer; width: 100%;
}

/* Lottery prize items */
.lottery-prize-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #fff8ed;
  border: 1px solid #f5d9a8; border-radius: 8px; font-size: 12px;
}
.lottery-prize-icon { font-size: 14px; }
.lottery-prize-name { font-weight: 600; color: var(--ink); }
.lottery-prize-prob { font-size: 10px; color: var(--muted); }

/* ---------- Banner Carousel ---------- */
.banner-carousel { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.banner-track { display: flex; transition: transform 0.4s ease; }
.banner-slide { flex: 0 0 100%; display: none; }
.banner-slide.active { display: block; }
.banner-content {
  display: flex; align-items: center; gap: 14px; padding: 24px 20px;
  border-radius: 14px; min-height: 90px; position: relative; overflow: hidden;
}
.banner-content::after {
  content: ""; position: absolute; top: -30px; right: -30px; width: 120px; height: 120px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); pointer-events: none;
}
.banner-content::before {
  content: ""; position: absolute; bottom: -40px; right: 20px; width: 80px; height: 80px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.08); pointer-events: none;
}
.banner-icon { font-size: 40px; flex: none; z-index: 1; }
.banner-text { flex: 1; z-index: 1; min-width: 0; }
.banner-slide-title { font-size: 20px; font-weight: 800; color: #fff; }
.banner-slide-sub { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 4px; }
.banner-action {
  flex: none; padding: 10px 20px; font-size: 14px; font-weight: 700; border-radius: 999px;
  background: var(--gold); color: #3a2a00; border: none; cursor: pointer; white-space: nowrap; z-index: 1;
}
.banner-action:hover { background: #e0a420; }
.banner-dots {
  display: flex; justify-content: center; gap: 6px; padding: 8px 0;
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
  cursor: pointer; transition: all 0.2s;
}
.banner-dot.active { background: #fff; width: 20px; border-radius: 4px; }

/* ---------- Lottery Result Modal ---------- */
.lottery-modal-box { max-width: 360px; padding: 36px 24px 24px; text-align: center; }
.lottery-result { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lottery-result-icon {
  font-size: 64px; width: 100px; height: 100px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; margin-bottom: 8px;
  animation: lotteryBounce 0.5s ease-out;
}
.lottery-result-icon.win { background: linear-gradient(135deg, #fde6a7 0%, #f2b632 100%); box-shadow: 0 4px 20px rgba(242,182,50,0.3); }
.lottery-result-icon.no-win { background: #f0f0f0; }
@keyframes lotteryBounce {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.lottery-result-title { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); }
.lottery-result-prize { font-size: 16px; font-weight: 600; color: var(--turf); }
.lottery-result-points { font-size: 28px; font-weight: 800; color: var(--gold-d); }
.lottery-result-no-points { font-size: 14px; color: var(--muted); }
.lottery-result-balance { font-size: 13px; color: var(--muted); margin-top: 8px; }
.lottery-result-balance b { color: var(--ink); }
.btn-lottery-again {
  margin-top: 12px; padding: 11px 24px; font-size: 15px; font-weight: 700; border-radius: 10px;
  background: var(--gold); color: #3a2a00; border: none; cursor: pointer;
}
.btn-lottery-again:hover:not(:disabled) { background: #e0a420; }
.btn-lottery-redeem {
  margin-top: 12px; padding: 11px 24px; font-size: 15px; font-weight: 700; border-radius: 10px;
  background: #6366f1; color: #fff; border: none; cursor: pointer; width: 100%;
}
.btn-lottery-redeem:hover:not(:disabled) { background: #4f52d5; }
.btn-lottery-close {
  margin-top: 6px; padding: 10px 24px; font-size: 14px; border-radius: 10px;
  background: #f0f3ee; color: var(--muted); border: 1px solid var(--line); cursor: pointer;
}
.btn-lottery-close:hover { background: #e6ebe4; }

.free-box { background: #f1f6f2; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.free-box label { font-size: 12px; color: var(--muted); }
.free-box input { margin: 4px 0; padding: 8px 10px; font-size: 16px; font-weight: 600; }
.free-total { font-size: 13px; color: var(--ink); }
.free-total b { color: var(--gold-d); font-size: 16px; }
.free-rule { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Back-to-top button ---------- */
#backToTop { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 1000;
  width: 44px; height: 44px; padding: 0; margin: 0; border-radius: 50%; border: 2px solid var(--gold); background: var(--pitch); color: var(--gold);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
#backToTop.show { opacity: 1; visibility: visible; transform: none; }
#backToTop:hover:not(:disabled) { background: #124a37; }
#backToTop svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { #backToTop { transition: none; } }

/* ---------- WhatsApp support floating button ---------- */
#supportBtn {
  position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 1000;
  width: 52px; height: 52px; padding: 0; margin: 0; border-radius: 50%;
  background: #25D366; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37,211,102,.45); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
#supportBtn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(37,211,102,.55); }
#supportBtn:active { transform: scale(0.95); }
#supportBtn svg { width: 26px; height: 26px; }
#supportBtn::after {
  content: ''; position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; border-radius: 50%; background: #ff424a;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
@media (prefers-reduced-motion: reduce) { #supportBtn { transition: none; } }
@media (max-width: 380px) { #supportBtn { width: 44px; height: 44px; } #supportBtn svg { width: 23px; height: 23px; } }

/* ---------- Prediction Form ---------- */
.predict-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 22px; margin: 16px 0;
  position: relative; overflow: hidden; box-shadow: 0 2px 12px rgba(15, 61, 46, 0.06);
}
.predict-card::before {
  content: ""; position: absolute; top: -8px; left: 8px; width: 28px; height: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 60'><line x1='6' y1='2' x2='6' y2='58' stroke='%2314221B' stroke-width='2'/><polygon points='6,4 38,4 28,18 38,32 6,32' fill='%23C8412F'/></svg>");
  background-size: contain; background-repeat: no-repeat; opacity: 0.85; pointer-events: none;
}
.predict-card::after {
  content: ""; position: absolute; bottom: -18px; right: -18px; width: 80px; height: 80px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='42' fill='%23fff' stroke='%231F7A4D' stroke-width='3'/><polygon points='50,28 64,40 58,58 42,58 36,40' fill='%231F7A4D'/><path d='M50 28 L50 12 M64 40 L82 30 M58 58 L74 76 M42 58 L26 76 M36 40 L18 30' stroke='%231F7A4D' stroke-width='2.5' fill='none'/></svg>");
  background-size: contain; background-repeat: no-repeat; opacity: 0.18; pointer-events: none;
}
.predict-match-header { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; margin-top: 4px; }
.predict-team { font-size: 19px; font-weight: 700; color: var(--ink); flex: 1; text-align: center; min-width: 80px; }
.predict-vs { font-size: 12px; font-weight: 700; color: #fff; background: var(--turf); padding: 5px 14px; border-radius: 999px; letter-spacing: 1.5px; box-shadow: 0 2px 4px rgba(31, 122, 77, 0.3); }
.predict-match-time { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; position: relative; z-index: 1; }
.predict-form { margin-top: 16px; position: relative; z-index: 1; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 22px 0 8px; }
.predict-form input, .predict-form select { display: block; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; margin: 0; }
.predict-form input:focus, .predict-form select:focus { outline: 2px solid var(--turf); outline-offset: 1px; }
.radio-row { display: flex; gap: 12px; margin-top: 6px; }
.radio-pill { flex: 1; position: relative; }
.radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill span { display: flex; align-items: center; justify-content: center; padding: 13px 16px; border: 2px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s; background: #fff; }
.radio-pill input:checked + span { border-color: var(--turf); background: #eaf6ee; color: var(--turf); }
.radio-pill:hover span { border-color: var(--turf); }
.predict-submit-btn { width: 100%; margin-top: 28px; padding: 14px; font-size: 16px; font-weight: 600; border-radius: 10px; position: relative; z-index: 1; }
.predict-success-box { background: #f0f8f3; border: 1px solid var(--turf); border-radius: 12px; padding: 20px 18px; margin-top: 18px; }
.predict-success-box h3 { margin: 0 0 12px; font-size: 17px; color: var(--turf); }
.predict-success-box p { margin: 6px 0; font-size: 14px; color: var(--ink); }

/* ---------- Share Link ---------- */
.share-link-box { background: #f7f9f6; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.share-link-box label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.share-link-row { display: flex; gap: 8px; }
.share-link-row input { flex: 1; margin: 0; padding: 9px 10px; font-size: 13px; }
.share-link-row button { margin: 0; padding: 9px 14px; white-space: nowrap; }
.share-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.share-wa-btn { display: inline-block; padding: 10px 16px; background: #25D366; color: #fff; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600; border: none; }
.share-wa-btn:hover { background: #20bd5a; }
.invite-code-display { font-size: 22px; font-weight: 800; color: var(--gold-d); letter-spacing: 2px; text-align: center; padding: 8px 0; }
.invite-code-text { font-weight: 700; color: var(--gold-d); font-size: 16px; }

/* ---------- Profile ---------- */
.profile-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 18px; margin: 16px 0; box-shadow: 0 2px 8px rgba(15, 61, 46, 0.04); }
.profile-section h3 { margin: 0 0 14px; font-size: 17px; }
.muted-text { color: var(--muted); font-size: 14px; }
.btn-logout { background: #f0f3ee; color: var(--muted); border: 1px solid var(--line); padding: 10px 28px; font-size: 14px; border-radius: 8px; }
.btn-logout:hover:not(:disabled) { background: #e6ebe4; color: var(--alert); border-color: var(--alert); }
.score-input-row { display: flex; align-items: center; gap: 12px; }
.score-input-row input { flex: 1; margin: 0; text-align: center; font-size: 22px; font-weight: 700; padding: 10px 8px; }
.score-dash { font-size: 20px; font-weight: 700; color: var(--muted); }
.rule-card { background: rgba(255,255,255,0.7); border: 1px dashed var(--turf); border-radius: 10px; padding: 12px 14px; margin-top: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--turf); transition: all .15s; }
.rule-card:hover { background: #eaf6ee; border-color: var(--pitch); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 16px; max-width: 480px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.2); animation: modalIn .2s ease-out; }
@keyframes modalIn { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-body { padding: 24px 22px 16px; overflow-y: auto; }
.modal-body h3 { margin: 0 0 6px; font-size: 18px; }
.modal-body .rules-intro { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.modal-body .rule-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.modal-body .rule-item:last-child { border-bottom: none; }
.modal-body .rule-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.modal-body .rule-desc { font-size: 14px; color: var(--ink); }
.modal-body .rule-bullets { margin: 4px 0 0; padding-left: 20px; }
.modal-body .rule-bullets li { font-size: 13px; color: var(--mute); margin: 2px 0; }
.modal-footer { padding: 12px 22px 18px; display: flex; gap: 10px; border-top: 1px solid var(--line); }
.modal-footer button { flex: 1; margin: 0; padding: 12px; font-size: 15px; font-weight: 600; }
.modal-footer button.btn-close { background: #f0f3ee; color: var(--muted); border-color: var(--line); }
.modal-footer button.btn-close:hover:not(:disabled) { background: #e6ebe4; }

.cash-modal-box { padding: 26px 22px 18px; text-align: center; }
.cash-modal-icon { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); display: flex; align-items: center; justify-content: center; font-size: 36px; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15); }
.cash-modal-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #0f172a; }
.cash-modal-desc { margin: 0 0 18px; font-size: 13px; color: #475569; line-height: 1.5; }
.cash-modal-body { text-align: left; }
.cash-modal-label { display: block; font-size: 12px; font-weight: 700; color: #0f172a; margin: 10px 0 4px; letter-spacing: 0.3px; }
.cash-modal-body input { width: 100%; padding: 11px 14px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; box-sizing: border-box; transition: border-color .15s, background .15s; }
.cash-modal-body input:focus { outline: none; border-color: #10b981; background: #fff; }
.cash-modal-summary { margin: 14px 0 4px; padding: 12px 14px; background: #f0fdf4; border: 1px dashed #86efac; border-radius: 8px; font-size: 13px; color: #166534; text-align: center; font-weight: 600; }
.cash-modal-footer { display: flex; gap: 10px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.cash-modal-footer button { flex: 1; padding: 12px; font-size: 15px; font-weight: 600; border-radius: 8px; }
.btn-cash-cancel { background: #f0f3ee; color: var(--muted); border: 1px solid var(--line); cursor: pointer; }
.btn-cash-cancel:hover { background: #e6ebe4; }
.btn-cash-confirm { background: #0f172a; color: #fff; border: none; cursor: pointer; }
.btn-cash-confirm:hover:not(:disabled) { background: #1e293b; }
.btn-cash-confirm:disabled { opacity: 0.5; cursor: not-allowed; }

.chips-modal-box { padding: 26px 22px 20px; text-align: center; }
.chips-modal-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: #e0e7ff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15); }
.chips-modal-icon svg { width: 44px; height: 44px; }
.chips-modal-title { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: #0f172a; }
.chips-modal-desc { margin: 0 0 16px; font-size: 14px; color: #475569; line-height: 1.55; }
.chips-modal-info { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 14px 16px; font-size: 13px; color: #166534; line-height: 1.6; text-align: left; margin-bottom: 16px; }
.chips-modal-body { text-align: left; }
.chips-modal-label { display: block; font-size: 13px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.chips-modal-body input { width: 100%; padding: 12px 16px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 10px; background: #f3f4f6; box-sizing: border-box; transition: border-color .15s, background .15s; }
.chips-modal-body input:focus { outline: none; border-color: #6366f1; background: #fff; }
.chips-modal-summary { margin: 14px 0 4px; padding: 12px 14px; background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 8px; font-size: 13px; color: #854d0e; text-align: center; font-weight: 600; }
.chips-modal-footer { display: flex; gap: 12px; margin-top: 18px; }
.chips-modal-footer button { flex: 1; padding: 13px; font-size: 15px; font-weight: 700; border-radius: 10px; letter-spacing: 0.5px; }
.btn-chips-back { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; cursor: pointer; }
.btn-chips-back:hover { background: #e5e7eb; }
.btn-chips-submit { background: #0f172a; color: #fff; border: none; cursor: pointer; }
.btn-chips-submit:hover:not(:disabled) { background: #1e293b; }
.btn-chips-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-chips-signup { display: block; width: 100%; margin-top: 12px; padding: 14px; font-size: 15px; font-weight: 700; border-radius: 10px; letter-spacing: 0.5px; background: #86efac; color: #14532d; border: 1px solid #4ade80; cursor: pointer; transition: background .15s; }
.btn-chips-signup:hover { background: #4ade80; }

/* ============================================================
   兑换到账滚动通知条 / Redemption Ticker
   ============================================================ */
.redeem-ticker {
  overflow: hidden;
  background: linear-gradient(90deg, var(--pitch) 0%, #0a2c20 50%, var(--pitch) 100%);
  padding: 0;
  height: 38px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.redeem-ticker:empty { display: none; }

.redeem-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  height: 38px;
  animation: tickerScroll 30s linear infinite;
  will-change: transform;
}
.redeem-ticker:hover .redeem-ticker-track {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px;
  font-size: 13px;
  color: #cfe3d8;
  font-weight: 500;
}
.ticker-item .ticker-icon {
  font-size: 15px;
  filter: drop-shadow(0 0 4px rgba(242,182,50,0.4));
}
.ticker-item .ticker-user {
  color: var(--gold);
  font-weight: 700;
}
.ticker-item .ticker-item-name {
  color: #fff;
  font-weight: 600;
}
.ticker-item .ticker-amount {
  color: var(--gold);
  font-weight: 700;
}
.ticker-item .ticker-action {
  color: #4ade80;
  font-weight: 600;
}
.ticker-divider {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin: 0 14px;
}

/* Empty state: hide ticker if no data */
.redeem-ticker.no-data { display: none; }

/* Mobile responsive */
@media (max-width: 480px) {
  .redeem-ticker { height: 34px; }
  .redeem-ticker-track { height: 34px; }
  .ticker-item { font-size: 12px; padding: 0 18px; }
}

/* ---------- Pre-match data card (league position / last 5 / head-to-head) ---------- */
.mi-wrap { position: relative; z-index: 1; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.mi-wrap[hidden] { display: none; }
.mi-loading { font-size: 13px; color: var(--muted); text-align: center; padding: 6px 0; }
.mi-wrap .mi-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; margin: 0; padding: 0; background: none; border: none; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.mi-wrap .mi-toggle:hover:not(:disabled) { background: none; color: var(--pitch); }
.mi-arrow { display: inline-block; font-size: 12px; color: var(--muted); transition: transform .15s; }
.mi-wrap.mi-collapsed .mi-arrow { transform: rotate(-90deg); }
.mi-wrap.mi-collapsed .mi-body { display: none; }
.mi-kicker { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 0; text-align: center; }
.mi-kicker img { width: 16px; height: 16px; object-fit: contain; }
.mi-dot { width: 3px; height: 3px; border-radius: 50%; background: #b7c2ba; }
.mi-teams { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 0; }
.mi-team { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.25; }
.mi-team img { width: 48px; height: 48px; object-fit: contain; margin-bottom: 6px; }
.mi-vs { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.mi-sec { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.mi-sec h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.mi-sec h4 small { text-transform: none; letter-spacing: 0; font-weight: 600; color: #8a978f; margin-left: 4px; }
.mi-pos-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mi-pos-box { background: #eaf6ee; border: 1px solid #cfe5d6; border-radius: 10px; padding: 10px 8px; text-align: center; }
.mi-pos-box.away { background: #f4f8f4; border-color: var(--line); }
.mi-pos-rank { font-size: 22px; font-weight: 800; color: var(--pitch); line-height: 1.1; }
.mi-pos-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.mi-pos-meta b { color: var(--ink); font-weight: 700; }
.mi-pos-none { font-size: 12px; color: var(--muted); }
.mi-form-block + .mi-form-block { margin-top: 12px; }
.mi-form-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mi-who { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; min-width: 0; }
.mi-who img { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.mi-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-chips { display: flex; gap: 4px; flex: 0 0 auto; }
.mi-chip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; font-size: 10px; font-weight: 800; color: #fff; line-height: 1; flex: 0 0 auto; }
.mi-chip.W { background: var(--turf); }
.mi-chip.D { background: var(--gold-d); }
.mi-chip.L { background: var(--alert); }
.mi-list { list-style: none; margin: 0; padding: 0; }
.mi-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 12px; }
.mi-list li:first-child { border-top: none; }
.mi-opp { flex: 1; min-width: 0; color: var(--ink); }
.mi-opp small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; }
.mi-ha { color: var(--muted); font-size: 10px; font-weight: 700; width: 14px; text-align: center; }
.mi-score { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-h2h-sum { background: #eaf6ee; border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 700; text-align: center; color: var(--pitch); margin-bottom: 8px; }
.mi-h2h { list-style: none; margin: 0; padding: 0; }
.mi-h2h li { display: grid; grid-template-columns: 62px 1fr auto 1fr; gap: 4px; align-items: center; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 11px; }
.mi-h2h li:first-child { border-top: none; }
.mi-h2h-date { color: var(--muted); font-weight: 600; }
.mi-h2h .h, .mi-h2h .a { min-width: 0; overflow-wrap: anywhere; }
.mi-h2h .h { text-align: right; }
.mi-h2h .w { font-weight: 700; color: var(--pitch); }
.mi-h2h-score { font-weight: 800; font-variant-numeric: tabular-nums; background: #f4f8f4; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.mi-note { margin: 12px 0 0; font-size: 10px; color: #8a978f; text-align: center; }
/* ============================================================
   SPORTS NEWS — homepage window, list view, article view
   (window sits between .store-hint and .store-list-head in the Store tab)
   ============================================================ */
:root { --wa: #25D366; }
.news-section { margin: 14px 0 0; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.news-head-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; }
.news-head-bar h3 { margin: 0; font-size: 15px; white-space: nowrap; }
.news-head-bar .news-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-tag { display: inline-block; font-size: 9.5px; font-weight: 800; color: #fff; border-radius: 3px; padding: 1px 6px; letter-spacing: .4px; line-height: 1.5; text-transform: uppercase; }
.news-key-badge { display: inline-block; font-size: 9.5px; font-weight: 800; color: var(--pitch); background: var(--gold); border-radius: 3px; padding: 1px 6px; letter-spacing: .4px; line-height: 1.5; }
.news-time { font-size: 11px; color: var(--muted); }
.news-meta { display: flex; align-items: center; gap: 6px; line-height: 1.2; flex-wrap: wrap; }
.news-wa { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--wa); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.15); text-decoration: none; }
.news-wa svg { width: 18px; height: 18px; fill: #fff; }
.news-wa.sm { width: 26px; height: 26px; box-shadow: none; }
.news-wa.sm svg { width: 13px; height: 13px; }
.news-section a, .news-list-link, .news-tr-body, .news-lead-body { color: inherit; }

.news-lead { display: block; padding: 0 12px 12px; }
.news-lead-img { display: block; position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--pitch); }
.news-lead-img img, .news-thumb img, .news-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--pitch), var(--turf)); }
.news-img-fallback img { width: 34% !important; height: auto !important; max-width: 140px; object-fit: contain !important; opacity: .9; }
.news-lead-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.news-lead-body { flex: 1; min-width: 0; text-decoration: none; }
.news-lead-title { font-size: 17px; font-weight: 800; line-height: 1.25; margin: 3px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-one-line { font-size: 12px; color: var(--muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.news-title-list { border-top: 1px solid #eef1ec; margin: 0 12px; }
.news-title-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef1ec; }
.news-title-row:last-child { border-bottom: none; }
.news-tr-body { flex: 1; min-width: 0; text-decoration: none; }
.news-tr-title { font-size: 14px; font-weight: 700; line-height: 1.3; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-foot { display: block; text-align: center; padding: 10px; border-top: 1px solid #eef1ec; font-size: 13px; font-weight: 700; color: var(--pitch) !important; text-decoration: none; background: #f6f9f5; }
.news-foot span { color: var(--gold-d); }

/* ---- News views (list + article) ---- */
.news-backbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 -16px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.news-back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--pitch) !important; text-decoration: none; padding: 6px 12px 6px 8px; border-radius: 999px; background: #eef3ee; }
.news-backbar .news-crumb { font-size: 13px; color: var(--muted); }
.news-backbar .news-wa { margin-left: auto; width: 30px; height: 30px; }
.news-article { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; padding: 14px 14px 4px; }
.news-article h1 { font-size: 23px; line-height: 1.22; margin: 8px 0; font-weight: 800; overflow-wrap: anywhere; }
.news-standfirst { font-size: 15px; color: #33443b; margin: 0 0 12px; line-height: 1.45; }
.news-cover { margin: 0 -14px 12px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--pitch); }
.news-body { overflow-wrap: anywhere; }
.news-body p, .news-body li { font-size: 15.5px; line-height: 1.62; }
.news-body p { margin: 0 0 14px; }
.news-body ul, .news-body ol { margin: 0 0 14px; padding-left: 22px; }
.news-body h4 { font-size: 16px; margin: 18px 0 6px; color: var(--pitch); }
.news-body h5 { font-size: 15px; margin: 14px 0 6px; color: var(--pitch); }
.news-body strong { font-weight: 800; color: var(--pitch); background: #fff4d6; padding: 0 4px; border-radius: 4px; }
.news-body a { color: var(--turf); font-weight: 600; }
.news-body img { max-width: 100%; height: auto; border-radius: 8px; }
.news-body blockquote { margin: 0 0 14px; padding: 8px 12px; border-left: 4px solid var(--gold); background: #fbf8ee; color: #33443b; }
.news-body hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.news-body code { background: #eef3ee; border-radius: 4px; padding: 0 4px; font-size: .92em; }
.news-figure { margin: 6px 0 16px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.news-figure img { width: 100%; display: block; border-radius: 0; }
.news-figure figcaption { font-size: 11.5px; color: var(--muted); padding: 8px 10px; background: #f6f9f5; }
.news-sources { background: #f6f9f5; border: 1px dashed #c7d3c9; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted); margin: 4px 0 14px; line-height: 1.5; overflow-wrap: anywhere; }
.news-sources > b { color: var(--ink); font-size: 12.5px; }
.news-sources p { margin: 4px 0 0; }
.news-sources ul, .news-sources ol { margin: 4px 0 0; padding-left: 16px; }
.news-sources strong { color: var(--ink); }
.news-sources a { color: var(--turf); }
.news-share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--wa); color: #fff !important; text-decoration: none; font-weight: 800; font-size: 15px; border-radius: 999px; padding: 12px; margin: 0 0 14px; }
.news-share-btn svg { width: 18px; height: 18px; fill: #fff; }
.news-related { margin-top: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.news-related h3 { margin: 0; font-size: 15px; padding: 10px 12px 8px; }
.news-related .news-title-list { margin: 0 12px 4px; }

.news-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.news-chips .match-filter-btn { flex: none; margin: 0; }
.news-list { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.news-list-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid #eef1ec; }
.news-list-row:first-child { border-top: none; }
.news-list-link { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; text-decoration: none; }
.news-thumb { flex: none; width: 104px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--pitch); }
.news-list-body { flex: 1; min-width: 0; }
.news-list-title { font-size: 13.5px; font-weight: 700; line-height: 1.25; margin: 3px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-more-btn { display: block; width: 100%; margin: 12px 0 0; background: #fff; color: var(--pitch); border: 1.5px solid var(--line); font-weight: 700; }
.news-more-btn:hover:not(:disabled) { background: #f6f9f5; }
.news-empty { color: var(--muted); text-align: center; padding: 28px 12px; }
@media (min-width: 640px) {
  .news-backbar { margin: 0 0 14px; border-radius: 12px; border: 1px solid var(--line); }
}


/* ============================================================
   POINTS LEDGER / HISTORY (Profile tab + Store shortcut)
   ============================================================ */
.link-btn {
  background: none; border: none; padding: 0; margin: 0 0 0 4px;
  color: var(--turf); font-weight: 700; font-size: 12px; cursor: pointer;
  text-decoration: underline; width: auto; display: inline;
}
.link-btn:hover { color: var(--pitch); background: none; }
.ledger-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ledger-list { display: flex; flex-direction: column; gap: 10px; }
.ledger-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fbfdfb;
}
.ledger-item-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.ledger-badges { display: flex; align-items: center; gap: 6px; }
.ledger-type {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: #e8eef5; color: #1e40af;
}
.ledger-type.invite { background: #fef3c7; color: #92400e; }
.ledger-delta { font-size: 14px; font-weight: 800; }
.ledger-delta.pos { color: var(--turf); }
.ledger-delta.neg { color: var(--alert); }
.ledger-time { font-size: 11.5px; color: var(--muted); }
.ledger-reason { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.ledger-match-box {
  background: #fff; border: 1px solid #e3ece5; border-radius: 8px;
  padding: 8px 10px; margin-top: 2px;
}
.ledger-comp-tag {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--pitch);
  background: #e6f4ea; padding: 1px 7px; border-radius: 999px; margin-bottom: 4px;
}
.ledger-match-name { font-size: 13.5px; font-weight: 700; color: var(--pitch); line-height: 1.35; }
.ledger-match-time { font-weight: 400; font-size: 12px; color: var(--muted); }
.ledger-match-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ledger-bal { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.ledger-pagination {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px;
}
.ledger-pg-info { font-size: 12px; color: var(--muted); }
.btn-ledger-pg {
  width: auto; margin: 0; padding: 6px 14px; font-size: 13px; border-radius: 8px;
  background: #f0f3ee; color: var(--pitch); border: 1px solid var(--line);
}
.btn-ledger-pg:disabled { opacity: 0.45; cursor: not-allowed; }
