/* METEORBET88 Design System */
:root {
  --purple-900: #120B24;
  --purple-800: #201A2E;
  --purple-700: #6D28D9;
  --purple-500: #8B5CF6;
  --purple-100: #EDE9FE;
  --gold: #F5B942;
  --gray: #746D82;
  --white: #FFFFFF;
  --font: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(18, 11, 36, 0.12);
  --header-h: 64px;
  --mbn-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: #f8f7fc;
  color: var(--purple-800);
  line-height: 1.6;
  font-size: 1rem;
  padding-bottom: calc(var(--mbn-h) + var(--safe-bottom));
  -webkit-text-size-adjust: 100%;
}
/* Extra room while the fixed disclaimer bar is visible (JS toggles the class) */
body.has-disclaimer {
  padding-bottom: calc(var(--mbn-h) + var(--safe-bottom) + 3.25rem);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple-700); text-decoration: none; }
a:hover { color: var(--purple-500); }
.container { width: min(1200px, 92%); margin: 0 auto; }
.container-fluid { width: min(1400px, 96%); margin: 0 auto; }

/* Header — deep brand bar so white CDN wordmark stays readable */
.site-header {
  background: linear-gradient(180deg, #1a1030 0%, var(--purple-900) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img {
  height: 34px;
  width: auto;
  max-width: min(168px, 52vw);
  object-fit: contain;
}
.nav-desktop { display: none; gap: 0.35rem 1.35rem; align-items: center; }
.nav-desktop > a,
.nav-dropdown-btn {
  font-weight: 600;
  font-size: .9rem;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
  transition: color .15s ease;
}
.nav-desktop > a:hover,
.nav-dropdown-btn:hover {
  color: var(--gold);
}
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none; border: none; font: inherit; font-weight: 600;
  cursor: pointer; padding: 0.35rem 0;
}
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: #1a1030; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  min-width: 176px; padding: .4rem 0; z-index: 120;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: .55rem 1rem;
  color: rgba(255, 255, 255, 0.88); font-weight: 600; font-size: .88rem;
}
.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
}
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  background: none; border: none; cursor: pointer; padding: 8px;
  border-radius: 10px;
}
.nav-toggle:active { background: rgba(255, 255, 255, 0.1); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 1px; }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
  body { padding-bottom: 0; }
  body.has-disclaimer { padding-bottom: 3rem; }
  .logo img { height: 38px; max-width: 180px; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-700) 50%, var(--purple-500) 100%);
  color: var(--white); padding: 3rem 0 4rem;
}
.hero-badge {
  display: inline-block; background: rgba(245,185,66,.2);
  color: var(--gold); padding: .25rem .75rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; margin-bottom: 1rem;
}
.hero-brand-logo {
  display: block;
  width: min(280px, 72vw);
  height: auto;
  margin: 0 0 .75rem;
}
.hero h1 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); font-weight: 700; margin-bottom: .75rem; opacity: .95; }
.hero p { opacity: .9; max-width: 560px; margin-bottom: 1.5rem; }
.hero-compact { padding: 2rem 0 2.5rem; }
.search-form { display: flex; gap: .5rem; max-width: 480px; }
.search-form-wide { max-width: 640px; }
.section-tight { padding-top: 1rem; }
.search-form input {
  flex: 1; padding: .75rem 1rem; border: none; border-radius: var(--radius);
  font-size: 1rem;
}
.search-form input:focus { outline: 2px solid var(--gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.25rem; border-radius: var(--radius);
  font-weight: 600; font-size: .9rem; border: 2px solid transparent;
  cursor: pointer; transition: all .2s;
}
.btn-primary { background: var(--purple-700); color: var(--white); }
.btn-primary:hover { background: var(--purple-500); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--purple-500); color: var(--purple-700); }
.btn-outline:hover { background: var(--purple-100); }
.btn-gold { background: var(--gold); color: var(--purple-900); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; }

/* Sections */
.section { padding: 2.5rem 0; }
.section-alt { background: var(--white); }
.section-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.section h2 { font-size: 1.5rem; color: var(--purple-900); }
.lead { color: var(--gray); margin-bottom: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Market cards */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}
.market-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
  border: 1px solid var(--purple-100);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.market-card:hover {
  transform: translateY(-4px);
  border-color: rgba(109, 40, 217, 0.32);
  box-shadow: 0 14px 36px rgba(18, 11, 36, 0.16);
}
.market-card-link { text-decoration: none; color: inherit; display: block; }
.market-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.market-short {
  background: var(--purple-100); color: var(--purple-700);
  padding: .15rem .5rem; border-radius: 6px; font-size: .75rem; font-weight: 700;
}
.market-card-title { font-size: 1rem; margin-bottom: .5rem; color: var(--purple-900); }
.market-card-schedule { font-size: .8rem; color: var(--gray); margin-bottom: .75rem; }
.market-card-note { font-size: .75rem; color: var(--gold); margin-bottom: .5rem; }
.market-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Pool cards (homepage + prediksi / livedraw grids) */
.market-grid-dense {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.pool-card {
  text-align: center;
  padding: 0 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.pool-card-top {
  margin-bottom: .35rem;
  margin-top: .15rem;
}
.pool-card-date {
  font-size: .7rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.pool-card .market-card-title {
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: .02em;
  margin-bottom: .2rem;
  line-height: 1.25;
  color: var(--purple-900);
}
.pool-card .market-card-schedule {
  font-size: .72rem;
  line-height: 1.45;
  margin-bottom: .65rem;
  color: var(--gray);
}
.pool-card .badge {
  align-self: center;
  margin-bottom: .85rem;
  padding: .28rem .75rem;
  font-size: .68rem;
  letter-spacing: .04em;
  box-shadow: 0 1px 4px rgba(18, 11, 36, 0.08);
}
/* Tall contain frame — full art (logos, heads) without harsh crop */
.pool-card-thumb,
.market-card-thumb {
  position: relative;
  margin: 0 -1rem 1rem;
  width: calc(100% + 2rem);
  min-height: 168px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(139, 92, 246, 0.35) 0%, transparent 65%),
    linear-gradient(160deg, #1a1030 0%, var(--purple-900) 45%, #0c0818 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
.pool-card-thumb::after,
.market-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 70%, rgba(8, 6, 20, 0.22) 100%);
  border-radius: inherit;
}
.pool-card-thumb img,
.market-card-thumb img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center center;
  padding: .7rem .8rem;
  box-sizing: border-box;
  display: block;
}
.btn-block { width: 100%; margin-top: auto; }
.pool-cta {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .62rem .85rem;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.28);
}
.pool-cta:hover {
  box-shadow: 0 6px 18px rgba(109, 40, 217, 0.38);
}
@media (max-width: 480px) {
  .pool-card-thumb,
  .market-card-thumb {
    min-height: 152px;
    aspect-ratio: 4 / 3;
  }
  .pool-card-thumb img,
  .market-card-thumb img {
    padding: .55rem .6rem;
  }
}

/* Badges */
.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
}
.badge-open { background: #d1fae5; color: #065f46; }
.badge-closed { background: #fee2e2; color: #991b1b; }
.badge-live { background: #fef3c7; color: #92400e; animation: pulse 1.5s infinite; }
.badge-holiday { background: var(--purple-100); color: var(--gray); }
.badge-next { background: #dbeafe; color: #1e40af; }
.badge-done { background: #f3f4f6; color: #6b7280; }
.badge-wait { background: #f5f3ff; color: #5b21b6; }

.page-header-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.next-jam { font-weight: 700; color: var(--purple-800); }
.session-count { color: var(--gray); font-size: .85em; }

.session-timeline {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.session-timeline-title { font-size: 1.05rem; margin: 0 0 .75rem; color: var(--purple-900); }
.session-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.session-item {
  display: flex; flex-direction: column; gap: .35rem;
  padding: .75rem; border-radius: 8px;
  background: var(--purple-100); border: 1px solid transparent;
  text-align: center;
}
.session-item.is-next,
.session-item.session-akan_live {
  border-color: #93c5fd; background: #eff6ff;
}
.session-item.session-live {
  border-color: #fbbf24; background: #fffbeb;
}
.session-item.session-selesai { opacity: .65; }
.session-time { font-weight: 700; font-size: 1.05rem; color: var(--purple-900); }
.session-countdown { margin: .75rem 0 0; font-size: .9rem; color: var(--gray); }
@media (max-width: 768px) {
  .session-timeline { padding: 1rem; }
  /* Horizontal swipe strip so many draw times stay readable on narrow screens */
  .session-list {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: .5rem;
    padding-bottom: .35rem;
    scroll-snap-type: x proximity;
  }
  .session-item {
    flex: 0 0 auto;
    min-width: 118px;
    scroll-snap-align: start;
  }
}
.demo-badge {
  display: inline-block; background: var(--gold); color: var(--purple-900);
  padding: .15rem .5rem; border-radius: 4px; font-size: .7rem; font-weight: 700;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* Filter chips */
.filter-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  padding: .35rem .85rem; border-radius: 999px; font-size: .8rem;
  background: var(--white); border: 1px solid var(--purple-100); color: var(--gray);
}
.chip.active, .chip:hover { background: var(--purple-700); color: var(--white); border-color: var(--purple-700); }

/* Tables */
.results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.data-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .9rem; }
.data-table th, .data-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--purple-100); }
.data-table th { background: var(--purple-900); color: var(--white); font-weight: 600; }
.data-table td { background: var(--white); }
.data-table tbody tr:nth-child(even) td { background: #f6f4fd; }
.data-table tbody tr:hover td { background: var(--purple-100); }

@media (max-width: 768px) {
  .data-table { font-size: .875rem; }
  .data-table th, .data-table td {
    padding: .65rem .75rem;
    white-space: nowrap;
  }
  /* Sticky first column keeps the row label visible while scrolling sideways */
  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: inset -6px 0 6px -6px rgba(18, 11, 36, 0.22);
  }
  .data-table th:first-child { z-index: 3; }
}

/* Prediction page — full-bleed market image + readable frosted panels */
.prediction-page {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  background-color: var(--purple-900);
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
  padding-bottom: 3rem;
  margin-bottom: 0;
}
.prediction-page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--purple-900);
  background-image: var(--prediction-hero-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.prediction-page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Sportsbook wash: darker left/top for text, image clearer right */
  background:
    linear-gradient(105deg,
      rgba(8, 6, 20, 0.94) 0%,
      rgba(10, 8, 24, 0.82) 38%,
      rgba(12, 9, 28, 0.55) 68%,
      rgba(10, 8, 24, 0.72) 100%),
    linear-gradient(180deg,
      rgba(8, 6, 20, 0.35) 0%,
      transparent 28%,
      rgba(8, 6, 20, 0.55) 100%);
}
.prediction-page > *:not(.prediction-page-bg) {
  position: relative;
  z-index: 1;
}
.prediction-page .breadcrumbs {
  background: rgba(8, 6, 20, 0.45);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem 0;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.prediction-page .breadcrumbs a {
  color: var(--gold);
  font-weight: 600;
}
.prediction-page .breadcrumbs a:hover { color: #ffd06a; }
.prediction-page .breadcrumbs li:not(:last-child)::after {
  color: rgba(255, 255, 255, 0.45);
}
.prediction-page .breadcrumbs [aria-current="page"] {
  color: rgba(255, 255, 255, 0.95);
}
.prediction-page-inner {
  padding-top: 1.25rem;
}
.prediction-hero-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  max-width: 760px;
  padding: 1.15rem 1.35rem;
  border-radius: 14px;
  background: rgba(10, 8, 24, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
.prediction-page .prediction-hero-header h1,
.prediction-hero-header h1 {
  color: #fff !important;
  font-size: clamp(1.4rem, 4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  margin: 0;
}
.prediction-page .countdown {
  width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}
.prediction-page .countdown-timer {
  color: var(--gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.prediction-page .badge {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.prediction-page .prediction-card,
.prediction-page .results-table-wrap,
.prediction-page .empty-state {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  color: var(--purple-800);
}
.prediction-page .empty-state {
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.prediction-page h3 {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.85rem;
}
.prediction-page .page-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(10, 8, 24, 0.35);
}
.prediction-page .page-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .prediction-page-bg::after {
    background: linear-gradient(105deg,
      rgba(8, 6, 20, 0.96) 0%,
      rgba(10, 8, 24, 0.88) 45%,
      rgba(10, 8, 24, 0.78) 100%);
  }
  .prediction-hero-header { background: rgba(10, 8, 24, 0.9); }
  .prediction-page .prediction-card,
  .prediction-page .results-table-wrap,
  .prediction-page .empty-state { background: #fff; }
}
@media (max-width: 600px) {
  .prediction-page { padding-bottom: 2rem; }
  .prediction-hero-header { padding: 1rem 1.1rem; }
  .prediction-page-inner { padding-top: 1rem; }
}

.prediction-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 2rem;
}
.prediction-table { width: 100%; }
.prediction-table th { text-align: left; width: 180px; color: var(--gray); font-weight: 600; padding: .5rem 0; vertical-align: top; }
.prediction-table td { font-size: 1.25rem; font-weight: 700; color: var(--purple-700); padding: .5rem 0; word-break: break-word; }

@media (max-width: 600px) {
  .prediction-card { padding: 1.15rem 1rem; }
  .prediction-card h2 { font-size: 1.15rem; }
  .prediction-table th { width: 118px; font-size: .82rem; padding: .55rem .5rem .55rem 0; }
  .prediction-table td { font-size: 1.05rem; padding: .55rem 0; }
  .prediction-table tr + tr th,
  .prediction-table tr + tr td { border-top: 1px solid var(--purple-100); }
}

/* Livedraw */
.livedraw-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; margin-bottom: .6rem; background: var(--purple-900); box-shadow: var(--shadow); }
.livedraw-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.livedraw-autoplay-note { font-size: .78rem; color: var(--gray); margin-bottom: 1.25rem; }
.livedraw-placeholder { background: var(--purple-100); padding: 3rem; text-align: center; border-radius: var(--radius); margin-bottom: 1.5rem; }
.result-live { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.result-digit { font-size: 2rem; font-weight: 800; color: var(--purple-700); background: var(--purple-100); padding: .5rem 1rem; border-radius: var(--radius); }
.source-label { font-size: .8rem; color: var(--gray); }
.livedraw-updated { font-size: .8rem; color: var(--gray); }
.text-muted { color: var(--gray); }
@media (max-width: 600px) {
  .livedraw-placeholder { padding: 2rem 1.25rem; }
  .result-live { gap: .6rem; }
  .result-digit { font-size: 1.5rem; padding: .45rem .8rem; }
}

/* Paito */
.paito-section { background: var(--white); }
.paito-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 1rem; background: var(--purple-100); border-radius: var(--radius); }
.paito-palette { display: flex; gap: .35rem; flex-wrap: wrap; }
.paito-color-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 2px solid transparent;
  font-weight: 700; cursor: pointer; transition: transform .15s;
}
.paito-color-btn.selected { border-color: var(--purple-900); transform: scale(1.1); }
.paito-color-btn.paito-eraser { background: var(--white); color: var(--gray); }
.paito-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.paito-table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.paito-table th, .paito-table td { border: 1px solid #ddd; padding: .4rem .6rem; text-align: center; background: var(--white); }
.paito-table th { background: var(--purple-900); color: var(--white); }
.paito-cell { cursor: pointer; min-width: 32px; font-weight: 700; user-select: none; }
.paito-cell.empty { color: #ccc; }
.paito-stats { margin-bottom: 1rem; font-size: .85rem; color: var(--gray); }
.paito-dark .paito-table { background: var(--purple-900); color: var(--white); }
.paito-dark .paito-table th, .paito-dark .paito-table td { background: var(--purple-900); border-color: rgba(255,255,255,.16); }
.paito-dark .paito-table th { background: var(--purple-800); }
.paito-dark .paito-table td:first-child { background: var(--purple-900); }
.paito-dark .paito-cell.paito-dim { opacity: .35; }
.paito-nav-month { display: flex; align-items: center; gap: 1rem; }
.paito-nav-month .btn { min-width: 44px; min-height: 40px; }
.paito-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.paito-empty { margin-bottom: 1rem; }
.paito-empty p { margin: 0 0 .5rem; }
.paito-empty-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem !important; }
.paito-fallback-note { font-size: .9rem; color: var(--gray); margin: 0 0 .75rem; }
.paito-cell.paito-dim { opacity: .28; }
.paito-row-empty td { color: #aaa; }
.paito-tools .btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 768px) {
  .paito-toolbar { padding: .85rem; gap: .75rem; }
  .paito-color-btn { width: 40px; height: 40px; }
  .paito-table { font-size: .85rem; }
  .paito-table th, .paito-table td { padding: .5rem .45rem; }
  .paito-cell { min-width: 36px; }
  /* Keep the date column pinned while scrolling the digit grid */
  .paito-table th:first-child,
  .paito-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: inset -6px 0 6px -6px rgba(18, 11, 36, 0.25);
  }
  .paito-table thead th:first-child { z-index: 3; }
  .page-header .paito-nav-month { width: 100%; justify-content: space-between; }
  .paito-empty-actions { width: 100%; }
  .paito-empty-actions .btn { flex: 1 1 auto; min-height: 44px; justify-content: center; }
}

/* Breadcrumbs */
.breadcrumbs { background: var(--purple-100); padding: .75rem 0; font-size: .85rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: .5rem; color: var(--gray); }

/* Page */
.page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.75rem; color: var(--purple-900); }
.page-actions { display: flex; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; }
.filter-bar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-bar select { padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--purple-100); }
.countdown { font-size: .9rem; color: var(--gray); }
.countdown-timer { font-weight: 700; color: var(--purple-700); }

/* Footer — dark bar matches header; white CDN logo stays readable */
.site-footer { background: var(--purple-900); color: rgba(255,255,255,.8); padding: 3rem 0 1rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-brand img { height: 32px; width: auto; max-width: 160px; }
.footer-brand p { font-size: .85rem; margin-top: .75rem; }
.footer-links h4 { color: var(--gold); margin-bottom: .75rem; font-size: .9rem; }
.footer-links a { display: block; color: rgba(255,255,255,.7); font-size: .85rem; margin-bottom: .35rem; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; font-size: .8rem; text-align: center; }
.main-content:has(.prediction-page) ~ .site-footer { margin-top: 0; }

/* Mobile bottom nav */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  display: flex; background: var(--white); border-top: 1px solid var(--purple-100);
  height: calc(var(--mbn-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(18,11,36,.08);
}
.mbn-item {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; font-size: .68rem; font-weight: 600;
  min-height: 44px;
  color: var(--gray); background: none; border: none; cursor: pointer; padding: .25rem;
  -webkit-tap-highlight-color: transparent;
}
.mbn-item svg { width: 22px; height: 22px; }
.mbn-item:active { background: var(--purple-100); }
.mbn-item.active, .mbn-item:hover { color: var(--purple-700); }
.mbn-item.active { font-weight: 700; }
.mbn-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--purple-700);
}
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(18,11,36,.55);
  display: flex; align-items: flex-end;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.mobile-menu-overlay[hidden] { display: none; }
.mobile-menu-panel {
  background: var(--white); width: 100%;
  border-radius: 18px 18px 0 0;
  padding: 1rem 1.25rem calc(1.25rem + var(--safe-bottom));
  display: flex; flex-direction: column; gap: .35rem;
  max-height: 82vh; max-height: 82dvh;
  overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(18, 11, 36, 0.35);
}
.mobile-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .35rem; margin-bottom: .25rem;
  border-bottom: 1px solid var(--purple-100);
}
.mobile-menu-title { font-weight: 800; font-size: 1.05rem; color: var(--purple-900); }
.mobile-menu-links { display: flex; flex-direction: column; }
.mobile-menu-links a {
  font-weight: 600; padding: .7rem .25rem; color: var(--purple-800);
  min-height: 44px; display: flex; align-items: center;
  border-bottom: 1px solid #f1eefb;
}
.mobile-menu-links a:active { background: var(--purple-100); }
.mobile-menu-links-secondary a { font-weight: 500; font-size: .9rem; color: var(--gray); }
.mobile-menu-group { padding: .6rem 0 .35rem; border-bottom: 1px solid #f1eefb; }
.mobile-menu-group-title {
  display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray); margin-bottom: .5rem;
}
.mobile-menu-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.mobile-menu-chips a {
  padding: .55rem .9rem; min-height: 40px; display: inline-flex; align-items: center;
  background: var(--purple-100); color: var(--purple-700);
  border-radius: 999px; font-weight: 600; font-size: .85rem;
}
.mobile-menu-chips a:active { background: var(--purple-500); color: var(--white); }
.mobile-menu-close {
  background: var(--purple-100); border: none; font-size: 1.35rem; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; color: var(--purple-800);
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

@media (min-width: 900px) { .mobile-bottom-nav, .mobile-menu-overlay { display: none !important; } }

/* Age gate */
.age-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(18,11,36,.85); display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.age-gate[hidden] { display: none; }
.age-gate-modal {
  background: var(--white); border-radius: var(--radius); padding: 2rem;
  max-width: 420px; text-align: center; box-shadow: var(--shadow);
}
.age-gate-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-700), var(--purple-500));
  color: var(--white); font-weight: 800; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.age-gate h2 { margin-bottom: .75rem; color: var(--purple-900); }
.age-gate p { font-size: .9rem; color: var(--gray); margin-bottom: 1.5rem; }
.age-gate-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Disclaimer bar */
.disclaimer-bar {
  position: fixed; bottom: calc(var(--mbn-h) + var(--safe-bottom)); left: 0; right: 0; z-index: 150;
  background: var(--purple-900); color: rgba(255,255,255,.9);
  font-size: .75rem; line-height: 1.45; padding: .5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.disclaimer-bar[hidden] { display: none; }
.disclaimer-inner { display: flex; align-items: center; gap: .75rem; }
.disclaimer-inner a { color: var(--gold); }
.disclaimer-close {
  background: none; border: none; color: var(--white); font-size: 1.25rem; cursor: pointer;
  margin-left: auto; flex-shrink: 0;
  min-width: 40px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
}
/* Short copy on phones keeps the bar to ~2 lines; full copy on desktop */
.disclaimer-text-short { display: none; }
@media (max-width: 600px) {
  .disclaimer-text-full { display: none; }
  .disclaimer-text-short { display: inline; }
}
@media (min-width: 900px) { .disclaimer-bar { bottom: 0; } }

/* Prose / content */
.prose h1 { font-size: 2rem; color: var(--purple-900); margin-bottom: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 1.5rem 0 .75rem; color: var(--purple-800); }
.prose h3 { font-size: 1.1rem; margin: 1rem 0 .5rem; }
.prose p, .prose li { margin-bottom: .75rem; color: var(--gray); }
.prose ul, .prose ol { padding-left: 1.5rem; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.guide-card { background: var(--purple-100); padding: 1rem; border-radius: var(--radius); }
.guide-card h3 { color: var(--purple-700); font-size: 1rem; margin-bottom: .5rem; }
.alert-info { background: var(--purple-100); border-left: 4px solid var(--purple-700); padding: 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.empty-state { text-align: center; padding: 3rem; color: var(--gray); }
.faq-item { border-bottom: 1px solid var(--purple-100); padding: .75rem 0; }
.faq-item summary { font-weight: 600; cursor: pointer; color: var(--purple-800); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.seo-content { background: var(--white); }

/* ============================================================
   Mobile polish — typography, spacing, tap targets (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .container { width: min(1200px, 94%); }
  .container-fluid { width: min(1400px, 94%); }

  .section { padding: 1.75rem 0; }
  .section h2 { font-size: 1.3rem; }
  .section-header { margin-bottom: 1rem; }

  .hero { padding: 2rem 0 2.5rem; }
  .hero-compact { padding: 1.5rem 0 2rem; }
  .hero p { font-size: .95rem; }

  .page-header { gap: .6rem; margin-bottom: 1.15rem; }
  .page-header h1 { font-size: 1.4rem; line-height: 1.3; }
  .lead { font-size: .92rem; margin-bottom: 1.15rem; }

  /* Comfortable tap targets across controls */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .pagination a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 .75rem; }

  /* Search: 16px input prevents iOS auto-zoom; button stays tappable */
  .search-form { gap: .45rem; }
  .search-form input { font-size: 16px; padding: .7rem .9rem; min-width: 0; }
  .search-form .btn { padding: .65rem 1rem; flex-shrink: 0; }

  /* Filter bars: full-width friendly selects, no iOS zoom */
  .filter-bar { gap: .45rem; }
  .filter-bar select {
    font-size: 16px; min-height: 44px;
    flex: 1 1 130px; min-width: 0;
    background: var(--white);
  }
  .filter-bar .btn { flex-shrink: 0; }

  /* Market grid: single comfortable column on phones */
  .market-grid, .market-grid-dense { gap: .9rem; }
  .breadcrumbs { font-size: .8rem; }
  .footer-grid { gap: 1.5rem; }
  .site-footer { padding: 2rem 0 1rem; }
}

@media (max-width: 480px) {
  .market-grid, .market-grid-dense { grid-template-columns: 1fr; }
  .market-card { padding: 1.15rem; }
  .pool-card { padding: 0 1.15rem 1.15rem; }
  .pool-card-thumb, .market-card-thumb { margin: 0 -1.15rem 1rem; width: calc(100% + 2.3rem); }
  .pool-card .market-card-title { font-size: 1.05rem; }
  .pool-card .market-card-schedule { font-size: .78rem; }
  .pool-cta { font-size: .85rem; padding: .72rem .85rem; }
  .page-actions { flex-direction: column; }
  .page-actions .btn { width: 100%; }
}

@media print {
  .site-header, .site-footer, .mobile-bottom-nav, .disclaimer-bar, .paito-toolbar { display: none !important; }
}
