/* Win4D shared stylesheet — structure + components only, no build step.
   The colour palette lives in theme.css (per-frontend: check4d = Navy+Gold,
   4d6d = Emerald+Charcoal). This file is byte-identical across both
   frontends — the @import below is what makes the two sites look different. */
@import "theme.css";

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-500); }
img { max-width: 100%; height: auto; }

/* ─── Header ───────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy-900); color: #fff;
  padding: 8px 16px;
  box-shadow: var(--shadow);
}
.site-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.site-header .brand {
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
  color: #fff;
}
.site-header .brand .b-4d { color: #FFD21E; }
.site-header .brand .b-co { font-weight: 500; }
.op-aliases { margin: 6px 0 0; font-size: 0.8rem; color: #5b6573; line-height: 1.5; }
.op-faq { max-width: 720px; margin: 28px auto 0; }
.op-faq h2 { font-size: 1.1rem; margin: 0 0 10px; color: var(--navy-900); }
.op-faq dt { font-weight: 700; margin: 12px 0 2px; color: var(--ink-900); }
.op-faq dd { margin: 0; color: var(--ink-700); font-size: 0.95rem; line-height: 1.6; }
.op-faq dd a { color: var(--navy-700); text-decoration: underline; }
.op-hub-up { margin: 8px 0 0; font-size: 0.85rem; }
.op-hub-up a { color: var(--navy-700); }
a.num-dict { color: inherit; text-decoration: none; }
a.num-dict:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.site-header nav {
  display: inline-flex; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem;
}
.site-header nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 6px; color: var(--ink-300); white-space: nowrap; font-weight: 600; }
.site-header nav a:hover { color: var(--gold-400); }
.site-header nav .zh { opacity: 0.8; font-weight: 400; }
@media (min-width: 768px) {
  .site-header nav { gap: 16px; font-size: 0.9rem; }
}
.meta-strip {
  font-size: 0.78rem; color: var(--ink-300);
  display: inline-flex; align-items: center; gap: 8px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(16,185,129,0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ─── Market quick-pills (sticky under header on mobile) ───────── */
.market-pills {
  position: sticky; top: 56px; z-index: 9;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 7px 12px;
  display: flex; flex-wrap: wrap; gap: 5px;
}
.market-pills a {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 9px;
  border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.76rem; line-height: 1.1; color: var(--ink-700);
  background: #fff; white-space: nowrap;
}
/* Desktop: centre the country tabs row. */
@media (min-width: 768px) { .market-pills { justify-content: center; } }
.market-pills a.is-active,
.market-pills a:hover {
  background: var(--navy-900); color: #fff; border-color: var(--navy-900);
}

/* ─── Main layout ──────────────────────────────────────────────── */
html { scroll-behavior: smooth; }  /* smooth anchor-jumps to market sections */
main { max-width: 1200px; margin: 0 auto; padding: 16px 12px 40px; flex: 1 0 auto; width: 100%; }
.hero h1 { font-size: 1.5rem; margin: 8px 0 4px; letter-spacing: -0.02em; }
.hero p, .lead { margin: 0; color: var(--ink-500); font-size: 0.92rem; }
.last-updated {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--ink-500); margin-top: 6px;
}
@media (min-width: 768px) { .hero h1 { font-size: 1.75rem; } }
/* Visually-hidden: screen-reader / crawler only. Keeps an SEO + answer-engine
   H1 on the homepage without occupying visual space. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.op-hero-head { display: flex; align-items: center; gap: 12px; }
.op-hero-head h1 { margin: 0; }

/* Content pages (about, disclaimer, how-to, dictionary stub) */
.prose { max-width: 720px; }
.prose h1 { font-size: 1.6rem; margin: 4px 0 12px; letter-spacing: -0.02em; }
.prose h2 { font-size: 1.15rem; margin: 22px 0 8px; color: var(--navy-900); }
.prose p, .prose li { font-size: 0.95rem; color: var(--ink-700); line-height: 1.6; }
.prose ul, .prose ol { padding-left: 22px; }
.prose strong { color: var(--ink-900); }
.prose a { text-decoration: underline; }

/* ─── Market section ───────────────────────────────────────────── */
.market { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
/* First market sits close to the tabs (no big gap, no divider). Targeted via the
   hero (which always precedes it) because the `.hero` <section> is the real
   :first-of-type sibling — so `.market:first-of-type` never matched and the first
   market was inheriting the full between-markets gap + top border. */
.hero + .market { margin-top: 10px; padding-top: 4px; border-top: 0; }
.market-title, .market h2 {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 1.3rem; font-weight: 800; margin: 0 0 16px;
  padding-left: 12px; border-left: 4px solid var(--gold-500);
  color: var(--navy-900);
}
@media (min-width: 768px) {
  .market { margin-top: 60px; padding-top: 34px; }
  .market-title, .market h2 { font-size: 1.6rem; }
}
.market-title .count { font-size: 0.78rem; font-weight: 500; color: var(--ink-500); }

/* Region underline tabs (MY only — West/East split) */
.region-tabs {
  display: inline-flex; gap: 0; margin: 4px 0 14px;
  border-bottom: 1px solid var(--line);
}
.region-tab {
  appearance: none; background: transparent; cursor: pointer;
  padding: 8px 14px 10px; font: inherit;
  color: var(--ink-500); font-size: 0.9rem; font-weight: 600;
  border: 0; border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 120ms, border-bottom-color 120ms;
}
.region-tab:hover { color: var(--navy-700); }
.region-tab.is-active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
}
.region-tab .count {
  font-size: 0.72rem; font-weight: 500;
  color: var(--ink-500);
  padding: 1px 7px; border-radius: 999px;
  background: var(--page);
}
.region-tab.is-active .count {
  color: var(--navy-900);
  background: rgba(212,160,23,0.15);
}

/* ─── Operator result block (competitor-style full table) ──────── */
/* Desktop tiles blocks into newspaper columns; mobile is single column. */
.op-stack { margin-top: 4px; display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 760px)  { .op-stack { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1080px) { .op-stack { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
/* Deep operator page: every game in the stack belongs to ONE operator, so stack
   them as tightly as the homepage in-card games (10px). Previously the grid `gap`
   and each block's `margin-bottom:16px` double-counted into a ~30px empty band.
   `:has(> .op-block)` targets only the deep-page stack (direct .op-block children);
   the homepage stack holds .op-card children and keeps its 14px card spacing. */
.op-stack > .op-block { margin-bottom: 0; }
.op-stack:has(> .op-block) { gap: 10px; }

/* Operator card — one per operator: brand-colour header + games stacked vertically. */
.op-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.op-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--op-accent, var(--navy-900)); color: var(--op-ink, #fff);
}
.op-logo {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 9px;
  height: 52px; min-width: 64px; padding: 5px 9px;
}
.op-logo img { max-height: 42px; max-width: 132px; width: auto; height: auto; display: block; object-fit: contain; }
.op-balls { gap: 5px; }
.op-balls i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.op-card-name {
  flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.15;
  font-weight: 800; font-size: 1.05rem; color: var(--op-ink, #fff); letter-spacing: -0.01em;
}
.op-card-name .zh { font-weight: 600; font-size: 0.78rem; opacity: 0.92; margin-top: 1px; }
.op-card-go { flex: 0 0 auto; color: var(--op-ink, #fff); font-size: 1.5rem; line-height: 1; opacity: 0.8; }
.op-card-head:hover .op-card-go { opacity: 1; }
.op-card-games { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: #e9ecf2; }
.op-card-foot {
  padding: 9px 14px; background: var(--page); border-top: 1px solid var(--line);
  font-size: 0.8rem; font-weight: 600; text-align: center;
}

/* Game rows inside a card: slim game header tinted toward the operator's brand
   colour, so each game visibly belongs to its operator (the card header alone
   wasn't enough). A brand-coloured left edge reinforces the grouping. The plain
   grey values come first as the pre-color-mix() fallback; modern browsers tint. */
.op-card-games .op-block {
  border: 1px solid #d3d8e0; border-left: 4px solid var(--op-accent);
  border-radius: 12px; box-shadow: 0 2px 7px rgba(20,30,60,0.12); margin: 0;
  background: var(--surface); overflow: hidden;
}
.op-card-games .op-head {
  background: #f2f4f8;
  background: color-mix(in srgb, var(--op-accent) 12%, #fff);
  color: var(--ink-700); padding: 9px 14px;
  border-bottom: 1px solid #e3e7ee;
  border-bottom-color: color-mix(in srgb, var(--op-accent) 24%, #fff);
}
.op-card-games .op-head .op-name {
  color: var(--ink-700);
  color: color-mix(in srgb, var(--op-accent) 72%, #000);
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.op-card-games .op-tag--live  { background: rgba(16,185,129,0.12); color: var(--live); }
.op-card-games .op-tag--stale { background: rgba(245,158,11,0.14); color: var(--stale); }
.op-card-games .op-tag--pending { background: rgba(245,158,11,0.14); color: var(--stale); }
.op-card-games .op-tag--overdue { background: rgba(239,68,68,0.14); color: #EF4444; }

.op-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  break-inside: avoid;            /* keep a block whole inside a column */
}

/* Header bar — full operator brand colour (deep-page standalone game blocks). */
.op-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px;
  background: var(--op-accent, var(--navy-900)); color: var(--op-ink, #fff);
}
.op-head .op-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; color: var(--op-ink, #fff); }
.op-head:hover .op-name { opacity: 0.82; }
.op-tag {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.op-tag--live  { background: rgba(16,185,129,0.18);  color: #6EE7B7; }
.op-tag--stale { background: rgba(245,158,11,0.20);  color: #FCD34D; }
.op-tag--pending { background: rgba(245,158,11,0.22); color: #FCD34D; }
.op-tag--pending .pulse { background: var(--stale); box-shadow: 0 0 0 0 rgba(245,158,11,0.6); animation: pulse-amber 1.6s infinite; }
.op-tag--overdue { background: rgba(239,68,68,0.22); color: #FCA5A5; }
.op-tag--overdue .pulse { background: #EF4444; box-shadow: 0 0 0 0 rgba(239,68,68,0.6); animation: pulse-red 1.6s infinite; }
@keyframes pulse-amber {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
@keyframes pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* Date + draw number strip */
.op-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 7px 12px;
  background: var(--page); border-bottom: 1px solid var(--line);
  font-size: 0.8rem; color: var(--ink-700);
}
.op-meta b { color: var(--navy-900); font-weight: 700; }

/* 1st / 2nd / 3rd — label left, big number right */
.op-top { padding: 2px 12px; }
.op-top-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.op-top-row:last-child { border-bottom: 0; }
.op-top-label {
  flex: 0 0 58px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-500);
}
.op-top-num {
  flex: 1; text-align: right;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.85rem; font-weight: 700; color: var(--navy-900);
  letter-spacing: 0.03em; line-height: 1.15;
}
.op-top-num a { color: inherit; }
.op-top-num a:hover { color: var(--gold-500); }
@media (min-width: 768px) { .op-top-num { font-size: 2rem; } }

/* Special / Consolation tables */
.op-tier-head {
  background: var(--ink-700); color: #fff;
  text-align: center; padding: 5px 4px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
}
.op-tier-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.op-tier-grid .c {
  text-align: center;
  font-family: ui-monospace, monospace; font-size: 0.95rem; font-weight: 600;
  color: var(--ink-900);
  padding: 8px 2px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.op-tier-grid .c:nth-child(5n) { border-right: 0; }
.op-tier-grid .c.is-empty { color: var(--ink-300); }
.op-tier-grid .c a { color: inherit; }

/* Sports Toto 4D Fireball — extra digit + per-tier swap numbers */
.op-fb-digit {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; background: #FEF2F2; border-bottom: 1px solid var(--line);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-500);
}
.op-fb-digit .zh { text-transform: none; }
.op-fb-digit b {
  font-family: ui-monospace, monospace; font-size: 1.5rem; line-height: 1;
  color: var(--op-accent, #AD0006); letter-spacing: 0.03em;
}
.op-fb-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.op-fb-row:last-of-type { border-bottom: 0; }
.op-fb-row .op-top-label {
  flex: 0 0 58px; display: flex; flex-direction: column; justify-content: center; padding-left: 12px;
}
.op-fb-grid { flex: 1; }
.op-fb-grid .c { border-bottom: 0; }
.op-fb-grid .c:first-child { font-weight: 700; color: var(--navy-900); }

/* Sports Toto 4D Zodiac — animal badge under the shared top-3 */
.op-zodiac {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; background: #FFFBEB; border-top: 1px solid var(--line);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-500);
}
.op-zodiac .zh { text-transform: none; font-weight: 600; }
.op-zodiac b { text-transform: none; font-size: 1.05rem; color: var(--navy-900); }
.op-zodiac-icon { font-size: 1.45rem; line-height: 1; vertical-align: middle; }

/* Toto / Mark Six balls inside a block */
.op-balls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px; }

/* 5D / 6D single winning number */
.op-single {
  display: flex; align-items: baseline; gap: 10px; padding: 14px 12px;
}
.op-single .label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500);
}
.op-single .num {
  font-family: ui-monospace, monospace; font-size: 1.9rem; font-weight: 700;
  color: var(--navy-900); letter-spacing: 0.05em;
}

/* Jackpot / annotation rows */
.op-jackpot {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: #FFFBEB;
  border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--ink-700);
}
.op-jackpot b { color: var(--navy-900); }
.op-note {
  padding: 8px 12px; font-size: 0.8rem; color: var(--ink-700);
  border-top: 1px solid var(--line);
}
.op-note b { color: var(--navy-900); }
/* Draw-evening indicator: new draw happened, official result not in yet.
   Sits above the previous draw to frame it as "previous", never replaces it. */
.op-note--pending {
  background: #FFFBEB; color: #92400E;
  border-top: 0; border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.op-note--pending .zh { color: #B45309; font-weight: 500; }

/* Footer — link to operator deep page / secondary games */
.op-foot {
  padding: 9px 12px; background: var(--page);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.op-foot a { font-weight: 600; }

/* Empty-state block */
.op-block--empty .op-body { padding: 18px 12px; }
.op-block--empty .empty { margin: 0; }

/* ─── Card grid: mobile 1-col → tablet 2-col → desktop 3-col ───── */
.card-grid, .cards {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 768px)  { .card-grid, .cards { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .card-grid, .cards { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* ─── Operator card (used by homepage cards + operator-page games) ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}
.card--empty { background: #FAFAFA; }
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 10px;
}
.card-head h2, .card-head h3 {
  margin: 0; font-size: 1rem; letter-spacing: -0.01em;
  color: var(--navy-900);
}
.card-head .subtitle { font-size: 0.78rem; color: var(--ink-500); margin-top: 2px; }
.card-tag {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.card-tag--live  { background: rgba(16,185,129,0.1);  color: var(--live); }
.card-tag--stale { background: rgba(245,158,11,0.12); color: var(--stale); }

.draw-meta, .card .meta {
  font-size: 0.8rem; color: var(--ink-500);
  border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px;
}
.draw-meta b, .card .meta b { color: var(--ink-700); font-weight: 600; }

/* ─── 4D top-3 tier display ────────────────────────────────────── */
.tiers-top {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.tier {
  text-align: center; padding: 6px 4px;
  background: linear-gradient(180deg, #FAFAFB, #F4F4F6);
  border-radius: 8px; border: 1px solid var(--line);
}
.tier-label {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-500); font-weight: 600;
}
.tier-num {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 1.6rem; font-weight: 700; color: var(--navy-900);
  letter-spacing: 0.02em; line-height: 1.2;
}
.tier-num a { color: inherit; }
.tier-num a:hover { color: var(--gold-500); }
@media (min-width: 768px) { .tier-num { font-size: 1.75rem; } }

/* ─── 4D special/consolation grid ──────────────────────────────── */
.tier-group { margin-top: 10px; }
.tier-group-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-500); font-weight: 600; margin-bottom: 4px;
}
.tier-group-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
}
.tier-group-grid .n {
  font-family: ui-monospace, monospace; font-size: 0.92rem; font-weight: 600;
  text-align: center; padding: 4px 2px;
  background: #FAFAFB; border-radius: 4px; color: var(--ink-700);
}
.tier-group-grid .n a { color: inherit; }

/* ─── Single-number display (5D, 6D, horse, 1+3D winning) ──────── */
.single-num {
  display: flex; align-items: baseline; gap: 8px;
  font-family: ui-monospace, monospace;
}
.single-num .label {
  font-size: 0.78rem; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.single-num .num {
  font-size: 1.75rem; font-weight: 700; color: var(--navy-900); letter-spacing: 0.04em;
}

/* ─── Toto / Mark Six balls ────────────────────────────────────── */
.balls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ball {
  display: inline-flex; justify-content: center; align-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-700); color: #fff;
  font-family: ui-monospace, monospace; font-size: 0.92rem; font-weight: 700;
}
.ball--bonus { background: var(--bonus); }
.ball--extra { background: var(--extra); color: var(--ink-900); }
.balls .sep { color: var(--ink-300); margin: 0 2px; font-size: 1.2rem; }

/* ─── Small annotation rows (horse, zodiac, fireball, jackpot) ── */
.annotation {
  margin: 8px 0 0;
  font-size: 0.85rem; color: var(--ink-700);
}
.annotation b { color: var(--navy-900); }
.horse, .zodiac, .fireball, .jackpot {
  margin: 8px 0 0;
  font-size: 0.85rem; color: var(--ink-700);
}

/* ─── Inline state ─────────────────────────────────────────────── */
.empty { color: var(--ink-500); font-style: italic; font-size: 0.9rem; }
.warn {
  background: #FFF8E6; border: 1px solid #FFD591; color: #92400E;
  padding: 10px 14px; border-radius: 8px;
  font-size: 0.88rem; margin: 12px 0;
}

/* ─── Forms (check / number lookup stub) ───────────────────────── */
.form-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.form-row input[type="text"] {
  flex: 1 1 200px; min-width: 0;
  padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff;
}
.form-row input[type="text"]:focus {
  outline: none; border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(30,50,102,0.15);
}
.btn {
  display: inline-block; padding: 10px 18px;
  background: var(--navy-900); color: #fff; border: 0; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--navy-700); color: var(--gold-400); }
.btn--ghost {
  background: #fff; color: var(--navy-700); border: 1px solid var(--navy-700);
}

/* ─── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-900); color: var(--ink-300);
  margin-top: 24px; padding: 24px 16px 16px;
}
.site-footer-inner { max-width: 1200px; margin: 0 auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.site-footer a { display: inline-block; padding: 8px 0; color: #fff; font-size: 0.9rem; }
.site-footer a:hover { color: var(--gold-400); }
.site-footer .copy { font-size: 0.78rem; color: var(--ink-300); margin: 8px 0 0; }

/* ─── Compliance disclaimer band ───────────────────────────────── */
.disclaimer {
  background: var(--navy-900); color: var(--ink-300);
  padding: 16px; font-size: 0.78rem; line-height: 1.5;
}
.disclaimer p { margin: 0 0 6px; max-width: 1200px; margin-left: auto; margin-right: auto; }
.disclaimer strong { color: var(--gold-400); }

/* ─── Inline Chinese (bilingual labels — secondary to the English) ─ */
.zh { font-weight: 500; font-size: 0.9em; opacity: 0.7; }
.op-top-label .zh { display: block; font-size: 0.92em; text-transform: none; opacity: 0.85; }
.op-tier-head .zh { opacity: 0.82; }
.market-pills .zh, .market-title .zh { opacity: 0.78; }
.hero h1 .zh { font-size: 0.62em; font-weight: 600; color: var(--ink-500); }

/* ─── Accessibility utilities ──────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0); clip-path: inset(50%);
  border: 0;
}

/* ─── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pulse,
  .op-tag--pending .pulse,
  .op-tag--overdue .pulse { animation: none; }
  * { transition: none !important; }
}

/* ─── Cookie-consent banner ────────────────────────────────────── */
/* Centered modal — NOT pinned to the bottom edge. A bottom-fixed bar's buttons sit
   under the mobile browser's toolbar (visual viewport < layout viewport), which made
   them untappable on real phones while passing every desktop/headless test. A
   centered dialog avoids the screen edge entirely. */
.c4d-consent {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(10,20,40,0.55);
}
/* CRITICAL: the rule above sets display:flex, which OVERRIDES the [hidden]
   attribute (class selector beats the UA [hidden] rule). Without this, JS setting
   el.hidden=true never actually hides the modal — clicking looked dead. */
.c4d-consent[hidden] { display: none !important; }
.c4d-consent-box {
  width: 100%; max-width: 440px;
  background: var(--navy-900); color: #fff;
  border-radius: 16px; padding: 22px 22px 20px;
  box-shadow: 0 12px 44px rgba(0,0,0,0.45);
}
.c4d-consent-text { margin: 0 0 16px; font-size: 0.95rem; line-height: 1.5; color: var(--ink-300); }
.c4d-consent-text a { color: var(--gold-400); }
.c4d-consent-text .zh { display: block; margin-top: 6px; opacity: 0.82; font-size: 0.9em; }
.c4d-consent-btns { display: flex; gap: 10px; }
.c4d-btn {
  flex: 1 1 0; min-height: 48px; padding: 12px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--gold-500); background: var(--gold-500); color: var(--navy-900);
  font-weight: 800; font-size: 0.95rem;
}
.c4d-btn .zh { font-weight: 400; }
.c4d-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }

/* Homepage "Results by region" mesh — links the homepage down to each market hub. */
.region-links { max-width: 1200px; margin: 24px auto 4px; padding: 0 16px; }
.region-links h2 { font-size: 1.05rem; color: var(--navy-900); margin: 0 0 12px; }
.region-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.region-grid a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 56px; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--navy-900);
  font-weight: 700; font-size: 0.95rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.region-grid a i { color: var(--gold-500); font-weight: 800; font-style: normal; font-size: 1.1rem; }
.region-grid a:hover, .region-grid a:active { border-color: var(--navy-900); background: var(--page); }
@media (max-width: 360px) { .region-grid { grid-template-columns: 1fr; } }
