/* ============================================================
   LotteryMigo design system
   ------------------------------------------------------------
   Edit the variables in :root to change the whole site.
   Dark colors are in the "prefers-color-scheme: dark" block.
   High contrast is html.lm-contrast in assets/a11y.css.
   Text size is --lm-font, changed by the A− / A+ control.
   Sections below are labeled so a later prompt can edit one
   piece without hunting through utility classes.
   ============================================================ */

/* --- Color, type, and spacing tokens --- */
:root {
  --font: "Outfit", "Outfit Fallback", "Segoe UI", system-ui, sans-serif;
  --display: "Outfit", "Outfit Fallback", "Segoe UI", system-ui, sans-serif;
  --lm-font: 18px;

  --space-1: 8px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --blur: 16px;
  --glass: rgba(255, 255, 255, 0.10);
  --glass-strong: rgba(8, 12, 10, 0.78);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-header: 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px rgba(0, 0, 0, 0.35);

  --bg: #070908;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --text: #f4f7f4;
  --muted: #d5ddd6;
  --line: rgba(255, 255, 255, 0.16);
  --card-line: rgba(255, 255, 255, 0.18);
  --link: #d6ff6a;

  --ink: #070908;
  --ivory: #f4f7f4;
  --heading: #ffffff;
  --primary: #c6f531;
  --primary-2: #d8ff62;
  --primary-ink: #102004;
  --gold: #ffc107;
  --gold-ink: #1a1404;
  --gold-text: #ffe08a;
  --success: #d4ff6a;
  --warn: #ffc46b;
  --danger: #ff8b9a;
  --pb: #e11d3a;
  --mm: #1d4ed8;
  --pb-text: #ffb4c0;
  --mm-text: #bfdbfe;
  --focus: #c6f531;

  --table-head: #141c18;
  --table-zebra: rgba(255, 255, 255, 0.04);
  --table-hover: rgba(198, 245, 49, 0.10);
  --footer: #050706;
  --footer-text: #e7eee8;

  --heat-high: #c6f531;
  --heat-high-ink: #102004;
  --heat-mid: #ffc107;
  --heat-mid-ink: #1a1404;
  --heat-low: #1c2a22;
  --heat-low-ink: #e7f5ea;
}

@font-face {
  font-family: "Outfit Fallback";
  src: local("Arial"), local("Liberation Sans");
  size-adjust: 103%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* --- Page baseline --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--lm-font, 18px);
  scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
  background: var(--bg);
}

body.page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  overflow-wrap: break-word;
}

body.page::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 12% 18%, rgba(225, 29, 58, 0.34), transparent 62%),
    radial-gradient(36% 40% at 88% 8%, rgba(29, 78, 216, 0.42), transparent 64%),
    radial-gradient(34% 36% at 72% 78%, rgba(198, 245, 49, 0.22), transparent 66%),
    radial-gradient(28% 30% at 18% 86%, rgba(56, 189, 248, 0.16), transparent 68%),
    var(--bg);
  animation: lm-aurora 10s ease-in-out infinite alternate;
}

img,
svg,
canvas {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a,
button,
summary,
.seg-btn,
.nav a,
.btn,
.chip,
.tip-chip {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
.brand-name,
.stat-value {
  font-family: var(--display);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.03em;
}

.kicker { color: var(--link); }

h1 {
  font-size: clamp(2.15rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
  overflow-wrap: normal;
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
}

.wrap {
  width: min(72rem, calc(100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  margin-inline: auto;
}

.page-narrow .wrap {
  width: min(46rem, calc(100% - 2rem));
}

main.stack,
.stack {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.stack > * { min-width: 0; }

main.wrap {
  flex: 1;
  padding-block: var(--space-6) var(--space-7);
}

.muted { color: var(--muted); }
.block { display: block; }
.banner { margin-top: var(--space-4); }
.center { text-align: center; }
.kicker {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.tone-gold { color: var(--gold-text); }
.tone-success { color: var(--success); }
.tone-warn { color: var(--warn); }
.tone-pb { color: var(--pb-text); }
.tone-mm { color: var(--mm-text); }
.tone-indigo { color: #c7d2fe; }
.tone-green { color: #d4ff6a; }
.tone-rose { color: #fecdd3; }

.hidden { display: none !important; }

.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;
}

/* --- Compliance strip --- */
.compliance {
  display: block;
  padding: 0.15rem calc(0.75rem + env(safe-area-inset-right, 0px)) 0.15rem calc(0.75rem + env(safe-area-inset-left, 0px));
  text-align: center;
  background: #1a2420;
  color: #f4f7f5;
  border-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.compliance > span { display: inline; }
.compliance .pill { margin-right: 0.35rem; vertical-align: middle; }
.compliance a { color: #ffd56a; }
.compliance a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(198, 245, 49, 0.45);
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
}

/* --- Header, brand, and navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(7, 9, 8, 0.55);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-header);
}

.header-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  padding-block: 0.4rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.header-top .brand {
  flex: 1 1 auto;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 22%;
  flex: none;
}

.brand-name {
  display: block;
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: 1.2rem;
}

.brand-tag {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  font-weight: 600;
  padding-bottom: 0.15rem;
  min-width: 0;
  max-width: 100%;
}

.header-bar > .nav { flex: 1 1 100%; }

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: none;
  min-width: 0;
}

.display-menu { position: static; flex: none; }

.display-toggle,
.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.nav-menu-btn { display: none; }

.header-bar.nav-collapsed .nav-menu-btn { display: inline-flex; }

@media (max-width: 1099px) {
  header .header-bar:not(.nav-collapsed) > .nav { display: none; }
}

.display-toggle[aria-expanded="true"],
.nav-menu-btn[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--primary);
}

.nav-results { position: relative; flex: none; }

.nav-results > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-results > summary::-webkit-details-marker { display: none; }

.nav-results > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
}

.nav-results[open] > summary,
.nav-results:has(a[aria-current="page"]) > summary {
  background: var(--surface-2);
}

.nav-results:has(a[aria-current="page"]) > summary {
  background: var(--primary);
  color: var(--primary-ink);
}

.nav-results-panel { display: none; }

.nav-results[open] > .nav-results-panel {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 14.5rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 50;
}

.nav-results-panel a { width: 100%; border-radius: 0.65rem; }

.header-bar.nav-collapsed > .nav { display: none; }

.header-bar.nav-collapsed > .nav.is-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1px);
  width: auto;
  max-width: none;
  max-height: min(70vh, calc(100dvh - 4.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow: auto;
  padding: 0.4rem 0.4rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 12, 10, 0.94);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
}

.header-bar.nav-collapsed > .nav.is-open a {
  width: 100%;
  border-radius: 0.65rem;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--heading);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
  text-decoration: none;
}

.nav-desktop { display: none; }

.nav-mobile {
  overflow-x: auto;
  padding-bottom: var(--space-2);
  flex-wrap: nowrap;
}

.page-narrow .site-header .wrap,
.page-narrow .site-footer .wrap {
  width: min(72rem, calc(100% - 2rem));
}

@media (min-width: 1100px) {
  .header-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0;
  }
  .header-top { display: contents; }
  .header-bar .brand { grid-column: 1; grid-row: 1; }
  header .header-bar > .nav {
    grid-column: 2;
    grid-row: 1;
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    justify-content: flex-end;
  }
  header .header-bar.nav-fit > .nav { overflow: visible; }
  .header-actions,
  .header-top > .tip-chip {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .header-bar.nav-collapsed { grid-template-columns: minmax(0, 1fr) auto; }
  .header-bar.nav-collapsed .brand { grid-column: 1; }
  .header-bar.nav-collapsed .header-actions,
  .header-bar.nav-collapsed .header-top > .tip-chip { grid-column: 2; }
  header .nav > a,
  header .nav-results > summary {
    padding: 0.2rem 0.5rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 720px) {
  .header-bar { padding-block: 0.2rem; gap: 0.35rem; }
  .header-top { flex-wrap: nowrap; gap: 0.35rem; }
  .header-top .brand { flex: 1 1 auto; min-width: 44px; }
  .brand-name {
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand img { width: 44px; height: 44px; }
  .header-actions { margin-left: auto; gap: 0.35rem; }
  .display-toggle,
  .nav-menu-btn,
  .tip-chip {
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.7rem;
    font-size: 1rem;
  }
}

@media (max-width: 390px) {
  .header-actions { gap: 0.2rem; }
  .display-toggle,
  .nav-menu-btn,
  .tip-chip { padding: 0 0.45rem; }
}

@media (max-width: 480px) {
  .header-top .brand { flex: 0 0 auto; }
  .header-top .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .header-bar { padding-block: 0.1rem; }
  .hero { padding-top: 1.4rem; padding-bottom: 1.4rem; }
  .compliance { font-size: 0.85rem; }
}

@media (min-width: 64rem) {
  .nav-desktop { display: flex; }
  .nav-mobile { display: none; }
  .brand-tag { display: block; }
}

@media (max-width: 40rem) {
  .brand-tag { display: none; }
}

/* --- Game switch --- */
.seg {
  display: flex;
  gap: 0.25rem;
  width: 100%;
  padding: 0.25rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.seg-btn {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.seg-btn.is-pb { background: var(--pb); color: #ffffff; }
.seg-btn.is-mm { background: var(--mm); color: #ffffff; }

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
  flex: none;
}

@media (min-width: 50rem) {
  .seg { width: auto; }
}

.hero .seg {
  width: max-content;
  max-width: 100%;
  justify-self: center;
}

@media (max-width: 340px) {
  .seg {
    flex-direction: column;
    border-radius: var(--radius);
    width: 100%;
  }
}

/* --- Cards, clusters, and stats --- */
.card {
  background: var(--surface);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}

.card-tight { padding: var(--space-4); }

.panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.inset {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.between {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.split {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.stats,
.feature-grid,
.help-grid {
  display: grid;
  gap: var(--space-3);
}

.stats { grid-template-columns: 1fr 1fr; }

.stat-value {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--display);
  font-weight: 640;
  font-size: clamp(1.05rem, 2.1vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.6rem, 6vw, 5.5rem) 0 clamp(2.4rem, 5vw, 4.5rem);
  border-bottom: 0;
  color: var(--ivory);
  background: transparent;
}

.hero-inner {
  width: min(42rem, 100%);
  margin-inline: auto;
  display: grid;
  gap: var(--space-3);
  text-align: center;
}

.badge {
  margin: 0 auto;
  max-width: 40rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-weight: 600;
  color: var(--text);
}

.notice {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.guarantee-bar {
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border-bottom: 1px solid var(--line);
}

.guarantee-line {
  margin: 0;
  padding: 0.4rem 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.guarantee-line a {
  font-weight: 700;
  margin-inline: 0.2rem;
}

.guarantee-line .btn {
  margin-left: 0.35rem;
  padding: 0.2rem 0.7rem;
  vertical-align: middle;
  font-size: 0.82rem;
}

@media (min-width: 40rem) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 52rem) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .split { grid-template-columns: 1.1fr 0.9fr; }
}

/* --- Buttons and fields --- */
.btn,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-gold {
  background: var(--gold);
  color: var(--gold-ink);
}

.btn-gold:hover { filter: brightness(1.05); }

.tip-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: none;
  width: auto;
  min-height: 48px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.tip-chip:hover { filter: brightness(1.05); }

.tip-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.tip-label-short { display: none; }

.tip-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tip-footer-link {
  color: var(--link);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .tip-label-full { display: none; }
  .tip-label-short { display: inline; }
  .tip-chip { padding: 0.35rem 0.65rem; }
}

.btn-quiet {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn-quiet:hover { background: var(--surface-2); }

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.chip {
  border-radius: 999px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.chip.is-on {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold);
}

.field {
  min-height: 48px;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(7, 9, 8, 0.72);
  color: var(--text);
}

.field-grow { min-width: min(100%, 16rem); flex: 1; }

@media (min-width: 64rem) {
  .actions-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- Lottery balls --- */
.balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-height: 3.4rem;
}

.balls a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.ball,
.history-ball {
  width: clamp(2.75rem, 10vw, 2.85rem);
  height: clamp(2.75rem, 10vw, 2.85rem);
  flex: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 640;
  color: #1a1408;
  background:
    radial-gradient(circle at 32% 26%, #ffffff 0%, #fff8ee 18%, transparent 34%),
    radial-gradient(circle at 32% 28%, #ffffff 0%, #f3ecdf 42%, #c9bfae 100%);
  box-shadow:
    inset 0 -10px 14px rgba(70, 48, 20, 0.22),
    inset 0 2px 4px #ffffff,
    0 8px 16px rgba(12, 18, 32, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.ball-pb {
  color: #ffffff;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 32% 30%, #ffb3be 0%, #e11d3a 46%, #7a0c1e 100%);
  box-shadow:
    inset 0 -12px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    0 8px 16px rgba(122, 12, 30, 0.28);
}

.ball-mm {
  color: #ffffff;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 32% 30%, #b9d0ff 0%, #1d4ed8 48%, #14275f 100%);
  box-shadow:
    inset 0 -12px 14px rgba(0, 0, 0, 0.3),
    inset 0 2px 3px rgba(255, 255, 255, 0.4),
    0 8px 16px rgba(12, 24, 90, 0.28);
}

.ball-pop {
  animation: popIn 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.line-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.line-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

/* --- Draw drum --- */
.machine {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chute {
  position: relative;
  width: 4.2rem;
  height: 2rem;
  border-radius: 0.6rem 0.6rem 0 0;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chute-slot {
  width: 2rem;
  height: 0.9rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0 0 0.4rem 0.4rem;
  background: var(--bg);
}

.chute-ring {
  position: absolute;
  left: 50%;
  bottom: -0.28rem;
  width: 5.2rem;
  height: 0.45rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #b45309, var(--gold), #b45309);
}

.sphere {
  position: relative;
  width: min(100%, 22.5rem);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 4px solid var(--line);
  overflow: hidden;
  background: #07110d;
  box-shadow: var(--shadow);
}

.sphere canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sphere-rim,
.sphere-shine {
  position: absolute;
  pointer-events: none;
}

.sphere-rim {
  inset: 0;
  border-radius: inherit;
  border: 6px solid color-mix(in srgb, var(--text) 12%, transparent);
}

.sphere-shine {
  top: 8%;
  left: 14%;
  width: 42%;
  height: 18%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  transform: rotate(-40deg);
}

.pedestal { display: flex; flex-direction: column; align-items: center; margin-top: -0.4rem; }

.pedestal-neck {
  width: 6rem;
  height: 0.85rem;
  background: linear-gradient(90deg, #64748b, #e2e8f0, #64748b);
}

.pedestal-base {
  width: min(100%, 11rem);
  min-height: 2.6rem;
  padding: 0.4rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  font-weight: 700;
}

.led-wrap { display: inline-flex; align-items: center; gap: 0.4rem; }

.led {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #64748b;
}

.led.is-on {
  background: var(--success);
  box-shadow: 0 0 0.5rem var(--success);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

.vents { display: inline-flex; gap: 0.25rem; }
.vents i {
  width: 0.22rem;
  height: 0.8rem;
  border-radius: 999px;
  background: var(--line);
  display: block;
}

.disclaimer {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
}

.pick-box { min-width: min(100%, 16rem); }
html.lm-boards-off .pick-box { display: none !important; }

.avatar { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; }

/* --- Heatmap, chart, and history table --- */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.legend-item { display: inline-flex; align-items: center; gap: var(--space-2); }

.swatch {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

.heat-cell {
  min-height: 3.25rem;
  padding: 0.25rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.heat-cell strong { font-size: 1.05rem; line-height: 1.1; }
.heat-cell span { font-size: 0.95rem; line-height: 1.1; }

.heat-high { background: var(--heat-high); color: var(--heat-high-ink); }
.heat-mid { background: var(--heat-mid); color: var(--heat-mid-ink); }
.heat-low { background: var(--heat-low); color: var(--heat-low-ink); }

.chart-frame { height: 18rem; }
.chart-frame canvas { width: 100%; height: 100%; display: block; }
.rule { border-top: 1px solid var(--line); padding-top: var(--space-5); }

.table-scroll {
  overflow: auto;
  min-width: 0;
  max-width: 100%;
  max-height: 70vh;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 36rem;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 0.75rem 0.35rem;
}

th,
td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head);
  box-shadow: inset 0 -1px 0 var(--line);
}

tbody tr:nth-child(even) td { background: var(--table-zebra); }
tbody tr:hover td { background: var(--table-hover); }
.num { text-align: center; font-variant-numeric: tabular-nums; }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

@media (min-width: 40rem) {
  .heatmap { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .chart-frame { height: 20rem; }
}

@media (min-width: 56rem) {
  .heatmap { grid-template-columns: repeat(14, minmax(0, 1fr)); }
}

/* --- Footer and legal prose --- */
.site-footer {
  margin-top: auto;
  border-top: 0;
  padding: var(--space-7) 0 var(--space-6);
  background: var(--footer);
  color: var(--footer-text);
}

.site-footer a { color: #ffffff; }
.site-footer .muted,
.site-footer p { color: var(--footer-text); }
.site-footer strong { color: #ffffff; }
.site-footer .nav { flex-wrap: wrap; overflow: visible; }
.site-footer .nav a { color: #ffffff; background: transparent; }
.site-footer .nav a:hover,
.site-footer .nav a[aria-current="page"] {
  background: transparent;
  color: #ffd56a;
  text-decoration: underline;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.prose {
  display: grid;
  gap: 1.15rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.prose h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin-top: 0.35rem;
  scroll-margin-top: 6.5rem;
}
.prose h3 { font-size: 1.12rem; line-height: 1.3; }
.prose p,
.prose li { max-width: 68ch; }

.toc {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.toc strong {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.2rem;
}
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose ul,
.prose ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.45rem; }
.prose .table-scroll table { min-width: 22rem; }
.prose .table-scroll.compact table { min-width: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: var(--space-3);
}
.stat-grid .panel { padding: var(--space-3); }
.stat-grid .stat-value { font-size: 1.35rem; }

.num-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.num-links a { font-variant-numeric: tabular-nums; }
.guide-list { display: grid; gap: var(--space-4); }
.guide-list h2 { font-size: 1.15rem; }
.pager-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
}

/* --- Small screens --- */
@media (max-width: 22rem) {
  .wrap { width: calc(100% - 1rem); }
  .card { padding: var(--space-4); }
}

@media (max-width: 11.5rem) {
  .ball,
  .history-ball {
    width: 2.2rem;
    height: 2.2rem;
  }
}

/* --- AdSense slots and cookie note --- */
.ad-slot { margin: 0; max-width: 100%; }
.ad-slot[hidden] {
  display: none !important;
  min-height: 0 !important;
}
.ad-slot:not([hidden]) {
  display: grid;
  gap: 0.25rem;
  min-height: 100px;
  max-width: 100%;
  overflow: hidden;
  contain: layout;
}
.ad-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ad-slot .adsbygoogle {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 90px;
  overflow: hidden;
}
@media (max-width: 40rem) {
  .ad-slot:not([hidden]),
  .ad-slot .adsbygoogle { min-height: 70px; }
}
.ads-notice {
  position: sticky;
  bottom: 0;
  z-index: 45;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px calc(12px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
  background-color: #0c110f;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: #f4f7f4;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.45);
}
.ads-notice p {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #f4f7f4;
  font-size: 0.95rem;
  line-height: 1.4;
}
.ads-notice a {
  color: #d6ff6a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.ads-notice .btn {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0.3rem 0.75rem;
  background: #c6f531;
  color: #102004;
  border-color: transparent;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.crumbs li { display: inline-flex; align-items: center; gap: 0.55rem; }
.crumbs li:not(:last-child)::after { content: "/"; color: var(--muted); }
.hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 0.4rem;
}
.hub-links a { font-weight: 600; }

/* --- Glass and aurora layer --- */
.site-header {
  background: rgba(7, 9, 8, 0.55);
  border-bottom: 1px solid var(--glass-border);
}

.kicker {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card,
.panel,
.line-card,
.inset {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
    var(--glass-strong);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.header-bar.nav-collapsed > .nav.is-open {
  background: rgba(8, 12, 10, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav a {
  border: 1px solid transparent;
}

.nav a:not([aria-current="page"]) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border);
}

.header-bar.nav-collapsed > .nav.is-open a:not([aria-current="page"]) {
  background: rgba(18, 24, 20, 0.96);
}

main h2 {
  position: relative;
}

main h2::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -12px;
  top: -10px;
  width: min(220px, 70%);
  height: 46px;
  background: radial-gradient(closest-side, rgba(198, 245, 49, 0.28), rgba(29, 78, 216, 0.0) 72%);
  pointer-events: none;
}

.hero h1,
.hero h1 .tone-pb,
.hero h1 .tone-mm,
.hero .badge,
.hero > .wrap > p {
  color: #f7f1e6;
}

.hero h1 .tone-pb { color: #ffb4c0; }
.hero h1 .tone-mm { color: #c5d6ff; }
.hero .tone-gold { color: #f3d48a; }
.hero .panel,
.hero .panel .tone-gold,
.hero .panel .tone-pb,
.hero .panel .tone-mm,
.hero .panel .tone-success,
.hero .panel .tone-warn {
  color: var(--text);
}
.hero .panel .tone-gold { color: var(--gold-text); }
.hero .panel .tone-pb { color: var(--pb-text); }
.hero .panel .tone-mm { color: var(--mm-text); }
.hero .panel .tone-success { color: var(--success); }
.hero .panel .tone-warn { color: var(--warn); }
.hero a { color: #f3d48a; }
.hero .badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
.hero .seg {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
.hero .seg-btn { color: #f7f1e6; }
.hero .seg-btn.is-pb,
.hero .seg-btn.is-mm { color: #ffffff; }
.hero .wrap,
.hero-inner { position: relative; z-index: 1; }

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-orbs .ball {
  position: absolute;
  width: clamp(3rem, 5vw, 4.75rem);
  height: clamp(3rem, 5vw, 4.75rem);
  font-size: clamp(1rem, 1.5vw, 1.45rem);
}
.hero-orbs .ball:nth-child(1) { top: 14%; left: 5%; }
.hero-orbs .ball:nth-child(2) { top: 20%; right: 7%; }
.hero-orbs .ball:nth-child(3) { bottom: 16%; left: 9%; width: clamp(3.8rem, 6vw, 5.6rem); height: clamp(3.8rem, 6vw, 5.6rem); }
.hero-orbs .ball:nth-child(4) { bottom: 18%; right: 11%; }
.hero-orbs .ball:nth-child(5) { top: 46%; right: 3.5%; }

.panel { container-type: inline-size; }
.stat-value,
.stat-grid .stat-value {
  font-size: clamp(1.15rem, 15cqi, 1.7rem);
  min-height: 2.4rem;
}

.prose {
  font-size: 1.08rem;
  line-height: 1.75;
}
.page-narrow .prose h2 {
  margin-top: 0.8rem;
  padding-top: 0.35rem;
}
.toc {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
}
.prose ol.guide-list,
.guide-list {
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-list li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.guide-list h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  margin: 0;
}
.guide-list h2 a { text-decoration: none; }
.guide-list h2 a:hover { text-decoration: underline; }

.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.85rem 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h2 {
  display: inline;
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}
.faq-item summary::after {
  content: "+";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--muted);
}
.faq-item[open] summary::after { content: "–"; }
.faq-body { padding: 0 0 1.1rem; }

.number-mark {
  width: 4.6rem;
  height: 4.6rem;
  font-size: 1.55rem;
}

.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(2.4rem, 6vw, 4.2rem) 0 1.6rem;
  background:
    radial-gradient(520px 240px at 0% 0%, rgba(208, 18, 45, 0.32), transparent 62%),
    radial-gradient(480px 240px at 100% 0%, rgba(29, 78, 216, 0.32), transparent 64%),
    #0c1220;
}
.site-footer .wrap::before {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.85rem;
  background: url("/icons/logo.svg") center / contain no-repeat;
}
.site-footer .wrap::after {
  content: "LotteryMigo";
  display: block;
  margin-top: 1.25rem;
  font-family: var(--display);
  font-weight: 640;
  font-size: clamp(2.5rem, 8vw, 6.2rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  white-space: nowrap;
  color: rgba(247, 241, 230, 0.07);
  -webkit-text-stroke: 1px rgba(247, 241, 230, 0.42);
}
.site-footer .nav {
  gap: 0.25rem 0.15rem;
}
.site-footer .nav a {
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border-radius: 0.65rem;
}
.site-footer {
  padding-bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 800px) {
  .hero { padding-top: 4.4rem; }
  .hero-orbs .ball {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.85rem;
  }
  .hero-orbs .ball:nth-child(n + 3) { display: none; }
  .hero-orbs .ball:nth-child(1) { top: 0.7rem; left: 0.75rem; }
  .hero-orbs .ball:nth-child(2) { top: 0.7rem; right: 0.75rem; }
}

html.lm-motion-off .lm-reveal,
html.lm-contrast .lm-reveal {
  opacity: 1;
  transform: none;
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.lm-motion-off) .card,
  html:not(.lm-motion-off) .panel,
  html:not(.lm-motion-off) .ball,
  html:not(.lm-motion-off) .guide-list li {
    transition: transform 220ms ease, box-shadow 220ms ease;
  }
  html:not(.lm-motion-off) .card:hover,
  html:not(.lm-motion-off) .panel:hover,
  html:not(.lm-motion-off) .guide-list li:hover {
    transform: translateY(-4px);
  }
  html:not(.lm-motion-off) .ball:hover {
    transform: translateY(-6px) scale(1.05);
  }
  html:not(.lm-motion-off) .lm-reveal:not(.is-in) {
    opacity: 0;
    transform: translateY(16px);
  }
  html:not(.lm-motion-off) .lm-reveal.is-in {
    animation: lm-rise 0.85s ease both;
  }
}

@media (hover: none) {
  html:not(.lm-motion-off) .card:hover,
  html:not(.lm-motion-off) .panel:hover,
  html:not(.lm-motion-off) .guide-list li:hover,
  html:not(.lm-motion-off) .ball:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page::before,
  .ball-pop,
  .lm-reveal,
  .lm-reveal.is-in {
    animation: none !important;
  }
  .lm-reveal,
  .lm-reveal.is-in,
  .ball-pop {
    opacity: 1 !important;
    transform: none !important;
  }
}

@keyframes lm-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.key-facts ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}
.key-facts li,
.key-facts p { margin: 0; }
.updated-line { color: var(--muted); font-size: 0.95rem; }

.analytics-choice {
  background: #0c110f;
  color: #f4f7f4;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 8px auto;
  width: min(40rem, calc(100% - 16px));
  position: relative;
  z-index: 30;
}
.analytics-choice h2 { margin: 0 0 4px; font-size: 1.05rem; line-height: 1.25; }
.analytics-choice p { margin: 0 0 8px; color: #f4f7f4; line-height: 1.35; font-size: 0.95rem; }
.analytics-choice a { color: #d6ff6a; }
.analytics-status { margin-bottom: 8px; }
.analytics-choice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.analytics-choice .btn { min-height: 44px; padding: 0.4rem 0.9rem; }
.analytics-choice .btn-quiet {
  background: #1a221e;
  color: #f4f7f4;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.analytics-manage { margin: 8px 0 0; }
.analytics-manage .btn { min-height: 44px; }

@keyframes lm-aurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2.5%, 1.5%, 0) scale(1.08); }
}
