/* ScratchFrenzy — two-tone dashboard (dark chrome + light content) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Dark chrome */
  --chrome:        #0d1117;
  --chrome2:       #141d2c;
  --chrome3:       #1c2840;
  --chrome-border: rgba(255,255,255,0.07);
  --chrome-text:   #94a3b8;
  --chrome-muted:  #4b5563;

  /* Light content */
  --bg:            #edf0f7;
  --card:          #ffffff;
  --border:        #e2e7f0;
  --text:          #111827;
  --text-muted:    #6b7280;
  --text-dim:      #9ca3af;

  /* Brand */
  --orange:        #f97316;
  --orange-dark:   #ea580c;
  --orange-dim:    rgba(249, 115, 22, 0.12);

  /* Semantic */
  --green:         #22c55e;
  --green-dim:     rgba(34,197,94,0.12);
  --yellow:        #f59e0b;
  --yellow-dim:    rgba(245,158,11,0.12);
  --red:           #ef4444;
  --red-dim:       rgba(239,68,68,0.12);
  --blue:          #3b82f6;
  --blue-dim:      rgba(59,130,246,0.12);

  /* Candy palette — kept for state badge compatibility */
  --pink:          #ec4899;
  --pink-dim:      rgba(236,72,153,0.1);
  --purple:        #a855f7;
  --grape:         #8b5cf6;
  --teal:          #14b8a6;
  --mint:          #10b981;
  --sky:           #38bdf8;
  --lemon:         #eab308;

  /* Layout */
  --header-h:      100px;
  --sidebar-w:     185px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 16px rgba(0,0,0,0.08);
  --shadow-card:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-pop:    0 8px 32px rgba(0,0,0,0.12);
}

html { font-size: 15px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--chrome);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Full-width header ────────────────────────────── */
.site-header {
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,0.009) 8px, rgba(255,255,255,0.009) 16px),
    radial-gradient(ellipse 45% 160% at 4% 50%, rgba(249,115,22,0.1) 0%, transparent 100%),
    var(--chrome);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(249,115,22,0.14);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  gap: 1rem;
}

/* Hamburger — hidden on desktop, shown ≤900px via media query */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #e2e8f0;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-toggle:active { background: rgba(255,255,255,0.1); }
.sidebar-toggle svg { width: 20px; height: 20px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 49;
  opacity: 0;
  transition: opacity .18s;
}
.sidebar-backdrop.open { display: block; opacity: 1; }

.logo-block {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  align-self: stretch;
}
.logo-img {
  height: 100%;
  width: auto;
  display: block;
  mix-blend-mode: lighten;
}
.logo-tagline {
  font-size: .62rem;
  font-weight: 600;
  color: var(--chrome-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  padding-top: .1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }
.status-bar {
  display: flex; align-items: center; gap: .35rem;
  font-size: .76rem; color: var(--chrome-text);
  white-space: nowrap;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--chrome-muted); flex-shrink: 0;
}
.status-dot.ok   { background: var(--green); box-shadow: 0 0 5px var(--green); }
.status-dot.busy { background: var(--yellow); animation: pulse 1s infinite; }
.status-dot.err  { background: var(--red); }

/* ── Data Status tab ─────────────────────────────────────────────────────── */
.ds-wrap { padding: 1.25rem 1.5rem; }
.ds-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem;
}
.ds-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.ds-sub { font-size: .75rem; color: var(--chrome-muted); margin-top: .2rem; }
.ds-header-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ds-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  padding: .2rem .6rem; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
}
.ds-chip.ds-ok   { color: var(--green); border-color: rgba(52,211,153,.25); }
.ds-chip.ds-warn { color: var(--yellow); border-color: rgba(251,191,36,.25); }
.ds-chip.ds-err  { color: var(--red); border-color: rgba(248,113,113,.25); }
.ds-chip.ds-never { color: var(--chrome-muted); border-color: rgba(255,255,255,.1); }
.ds-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.ds-refresh-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--chrome-text); border-radius: 6px;
  padding: .25rem .7rem; font-size: .75rem; cursor: pointer;
  transition: background .15s;
}
.ds-refresh-btn:hover { background: rgba(255,255,255,.12); }
.ds-rescrape-btn {
  background: none; border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.4); border-radius: 4px;
  padding: 0 .35rem; font-size: .7rem; cursor: pointer; line-height: 1.5;
  transition: all .15s; vertical-align: middle; margin-left: .35rem;
}
.ds-rescrape-btn:hover { background: rgba(255,255,255,.08); color: var(--chrome-text); border-color: rgba(255,255,255,.25); }
.ds-rescrape-btn.ds-rescrape-running { color: var(--yellow); border-color: var(--yellow); pointer-events: none; }
.ds-scraper-status {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--yellow);
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.2);
  border-radius: 8px; padding: .5rem .85rem; margin-bottom: 1rem;
}
.ds-running-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--yellow); animation: pulse 1s infinite;
  flex-shrink: 0;
}
.ds-table-wrap { overflow-x: auto; }
.ds-table {
  width: 100%; border-collapse: collapse;
  font-size: .82rem;
}
.ds-table thead th {
  text-align: left; padding: .4rem .75rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--chrome-muted);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ds-state-row td { padding: .55rem .75rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.ds-state-row:last-child td { border-bottom: none; }
.ds-state-row:hover td { background: rgba(255,255,255,.03); }
.ds-state-active td { background: rgba(251,191,36,.05) !important; }
.ds-sdot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--chrome-muted);
}
.ds-sdot.ok    { background: var(--green); box-shadow: 0 0 5px rgba(52,211,153,.5); }
.ds-sdot.warn  { background: var(--yellow); }
.ds-sdot.err   { background: var(--red); box-shadow: 0 0 5px rgba(248,113,113,.4); }
.ds-sdot.never { background: rgba(255,255,255,.2); }
.ds-sdot.busy  { background: var(--orange); box-shadow: 0 0 6px var(--orange); animation: pulse 1s infinite; }
.ds-state-code { font-weight: 700; color: var(--orange); min-width: 2.2rem; font-size: .75rem; }
.ds-state-name { color: var(--text); flex: 1; }
.ds-err-msg {
  display: block;
  margin-top: .2rem;
  font-size: .68rem;
  color: var(--red);
  font-family: var(--font-mono, ui-monospace, monospace);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22rem;
  cursor: help;
}
.ds-state-when { color: var(--chrome-muted); font-size: .72rem; white-space: nowrap; }
.ds-state-games { color: var(--chrome-muted); font-size: .72rem; white-space: nowrap; min-width: 4.5rem; text-align: right; }
.ds-loading { color: var(--chrome-muted); font-size: .85rem; padding: 1rem .75rem; }
.ds-muted { color: var(--chrome-muted); }
.ds-col-num { text-align: right; white-space: nowrap; }
.ds-pct { font-size: .78rem; font-weight: 600; }
.ds-pct-hi  { color: var(--green); }
.ds-pct-mid { color: var(--yellow); }
.ds-pct-lo  { color: var(--red); }
.ds-detail-tag {
  display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: .1rem .35rem; border-radius: .2rem;
  margin-left: .35rem; vertical-align: middle;
}
.ds-detail-store { background: rgba(232,93,4,.18); color: var(--orange); }
.ds-detail-city  { background: rgba(96,165,250,.18); color: #60a5fa; }
.ds-table thead th[data-col] {
  cursor: pointer; user-select: none;
  position: relative; padding-right: 1.5rem;
}
.ds-table thead th[data-col]:hover { color: var(--text); background: rgba(255,255,255,.05); }
.ds-table thead th[data-col]::after {
  content: '⇅'; position: absolute; right: .4rem;
  opacity: .25; font-size: .65rem; font-weight: 400;
}
.ds-table thead th.ds-th-asc::after  { content: '▲'; opacity: 1; color: var(--orange); }
.ds-table thead th.ds-th-desc::after { content: '▼'; opacity: 1; color: var(--orange); }
.ds-chip[data-filter] { cursor: pointer; transition: outline .1s; }
.ds-chip-active { outline: 1px solid currentColor; background: rgba(255,255,255,.07); }
.ds-admin-divider {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--chrome-muted); border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem; margin: 1.5rem 0 .75rem;
}

.user-chip {
  display: flex; align-items: center; gap: .5rem;
}
.user-chip-email { font-size: .78rem; color: var(--chrome-text); }
.user-chip-role {
  font-size: .65rem; font-weight: 700; letter-spacing: .05em;
  padding: .18rem .5rem;
  border-radius: 20px;
  border: 1px solid var(--orange);
  color: var(--orange);
  text-transform: uppercase;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s, opacity .12s;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.btn-scrape {
  background: var(--orange);
  color: #fff; border: none;
  font-weight: 700;
  padding: .42rem 1rem;
  box-shadow: 0 3px 12px rgba(249,115,22,0.35);
}
.btn-scrape svg { width: 14px; height: 14px; }
.btn-scrape:hover { background: var(--orange-dark); box-shadow: 0 6px 20px rgba(249,115,22,.45); }
.btn-scrape.busy { opacity: .75; }

.btn-login {
  background: transparent;
  color: var(--chrome-text);
  border-color: var(--chrome-border);
}
.btn-login:hover { background: var(--chrome2); color: #fff; }

.btn-logout {
  background: none; border: none;
  color: var(--chrome-text); font-size: .78rem;
  cursor: pointer; font-family: inherit;
  padding: 0;
}
.btn-logout:hover { color: #fff; }

/* ── App shell (below header) ─────────────────────── */
.app-shell {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  align-items: flex-start;
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,0.007) 8px, rgba(255,255,255,0.007) 16px),
    radial-gradient(ellipse 200% 28% at 50% 110%, rgba(249,115,22,0.09) 0%, transparent 100%),
    var(--chrome);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: hidden;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--chrome-border);
}
.sidebar-nav {
  flex: 1;
  padding: .85rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .18rem;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

/* Sidebar items are also tab buttons */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--chrome-text);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, color .12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  position: relative;
}
.sidebar-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .7; }
.sidebar-item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.sidebar-item:hover svg { opacity: 1; }

/* Active = orange pill */
.sidebar-item.active {
  background: linear-gradient(135deg, #fb923c 0%, var(--orange) 60%, #ea580c 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 16px rgba(249,115,22,0.28);
  transition: none;
}
.sidebar-item.active svg { opacity: 1; }
.sidebar-item.active:hover { background: var(--orange-dark); }

.sidebar-item-muted {
  opacity: .4;
  pointer-events: none;
}

/* Nested strategy sub-nav under EV Games */
.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  margin: .15rem 0 .35rem .9rem;
  padding-left: .7rem;
  border-left: 1px solid rgba(255,255,255,.08);
}
.sidebar-subitem {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .6rem;
  border: none;
  background: none;
  color: var(--chrome-text);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 500;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  position: relative;
  transition: color .12s, background .12s;
}
.sidebar-subitem:hover { color: #e2e8f0; background: rgba(255,255,255,.05); }
.sidebar-subitem.active {
  color: var(--orange);
  background: rgba(249,115,22,.08);
  font-weight: 700;
}
.sidebar-subitem.active::before {
  content: "";
  position: absolute;
  left: -0.71rem;
  top: 4px; bottom: 4px;
  width: 2px;
  background: var(--orange);
  border-radius: 1px;
}
.sub-lock { font-size: .68rem; opacity: .85; }
body.is-pro-user .sub-lock { display: none; }
@media (max-width: 900px) {
  .sidebar-subnav { margin-left: 1rem; }
  .sidebar-subitem { padding: .5rem .7rem; font-size: .82rem; }
}

.sidebar-divider { height: 1px; background: var(--chrome-border); margin: .35rem 0; }

.sidebar-footer {
  padding: .75rem .65rem;
  border-top: 1px solid var(--chrome-border);
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.sidebar-account {}
.sidebar-login-btn {
  width: 100%;
  justify-content: center;
  font-size: .78rem;
  padding: .35rem .9rem;
  box-sizing: border-box;
}

/* Pro CTA — shown for non-logged-in users */
.sidebar-pro-cta {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(249,115,22,.13) 0%, rgba(249,115,22,.05) 100%);
  border: 1px solid rgba(249,115,22,.28);
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.sidebar-pro-cta:hover {
  background: linear-gradient(135deg, rgba(249,115,22,.22) 0%, rgba(249,115,22,.1) 100%);
  border-color: rgba(249,115,22,.5);
}
.sidebar-pro-cta-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--orange);
  opacity: .9;
}
.sidebar-pro-cta-text {
  display: flex;
  flex-direction: column;
  gap: .05rem;
  line-height: 1.2;
}
.sidebar-pro-cta-text strong {
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange);
}
.sidebar-pro-cta-text span {
  font-size: .67rem;
  color: var(--chrome-text);
  opacity: .6;
}

/* Account label — truncate so long emails never overflow */
#userDisplayName {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* My Store sidebar link */
.sidebar-mystore {
  color: #14b8a6;
  text-decoration: none;
}
.sidebar-mystore:hover { background: rgba(20,184,166,.1); color: #14b8a6; }
.sidebar-mystore svg { color: #14b8a6; opacity: .8; }

/* Admin-only scrape/cancel buttons in sidebar */
.sidebar-scrape-btn { color: var(--orange); }
.sidebar-scrape-btn:hover { color: var(--orange); }
.sidebar-cancel-btn { color: var(--red, #ef4444); font-size: .8rem; }
.sidebar-cancel-btn:hover { background: rgba(239,68,68,.08); color: var(--red, #ef4444); }

/* PRO chip on the account button (shown when logged in) */
.sidebar-pro-chip {
  margin-left: auto;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .07em;
  padding: .1rem .32rem;
  border-radius: 3px;
  line-height: 1.5;
  flex-shrink: 0;
}

/* ── Main area (light) ────────────────────────────── */
.main-area {
  flex: 1;
  min-width: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(99,119,180,0.09) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  border-radius: 18px 0 0 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}
.content { flex: 1; padding-bottom: 2rem; }

/* ── Stats strip (inline KPI row, no cards) ───────── */
.stats-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  padding: 1rem 1.5rem .6rem;
}
.stat-cell,
.stat-card {
  position: relative;
  padding: .15rem 1.25rem;
  border-left: 1px solid var(--border);
  min-width: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  justify-content: flex-end;
}
.stat-cell { flex-direction: column; }
.stat-cell:first-child,
.stats-row > .stat-card:first-child { border-left: 0; padding-left: 0; }

.stat-label {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-muted);
  margin: 0 0 .2rem;
}
.stat-card .stat-label { margin: .2rem 0 0; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  padding-bottom: .35rem;
}
.stat-cell .stat-value { display: inline-block; }
.stat-value::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.6rem;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
}
.stat-cell[data-accent="orange"] .stat-value::after,
.stats-row > .stat-card:first-child .stat-value::after { background: var(--orange); }
.stat-cell[data-accent="sky"] .stat-value::after { background: var(--sky); }
.stat-cell[data-accent="green"] .stat-value::after,
.stat-card.highlight-green .stat-value::after { background: var(--green); }
.stat-cell[data-accent="gold"] .stat-value::after,
.stat-card.highlight-yellow .stat-value::after { background: var(--yellow); }
.stat-card.highlight-red .stat-value::after { background: var(--red); }

@media (max-width: 760px) {
  .stats-row { grid-auto-flow: row; grid-template-columns: repeat(2,1fr); row-gap: .9rem; }
  .stat-cell:nth-child(odd),
  .stats-row > .stat-card:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 480px)  {
  .stats-row { grid-template-columns: 1fr; row-gap: .75rem; }
  .stat-cell, .stat-card { border-left: 0; padding-left: 0; }
}

/* Collapse stats-row when every child stat-card is hidden (Chase per-state).
   Uses :has() — Chrome 105+/Safari 15.4+/Firefox 121+. */
.stats-row:not(:has(.stat-cell)):not(:has(.stat-card:not([style*="display:none"]):not([style*="display: none"]))) {
  display: none;
}

/* ── Big wins banner (lives in the header) ────────── */
.bigwins-banner {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: 1;
  min-width: 0;
  border-left: 1px solid rgba(249,115,22,0.3);
  border-right: 1px solid rgba(249,115,22,0.15);
  padding: 0 1.1rem;
  align-self: stretch;
  overflow: hidden;
}
.bigwins-banner-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  white-space: nowrap;
}
.bigwins-banner-items {
  overflow: hidden; flex: 1;
}
.bigwins-ticker-track {
  display: inline-flex; gap: .6rem; white-space: nowrap;
  animation: bigwins-ticker 800s linear infinite;
}
.bigwins-ticker-track:hover { animation-play-state: paused; }
.bigwins-freshness {
  text-align: center;
  font-size: .68rem;
  color: #64748b;
  padding: 2px 0 3px;
  letter-spacing: .03em;
}
@keyframes bigwins-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.bigwins-banner-item,
.bigwins-banner-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  white-space: nowrap;
  font-size: .78rem;
  color: #e2e8f0;
  flex-shrink: 0;
}
.bigwins-banner-item .bw-amount { color: var(--orange); font-weight: 700; }
.bigwins-chip-game { color: #e2e8f0; }
.bigwins-chip-prize { color: var(--orange); font-weight: 700; }
.bigwins-banner-chip-link { cursor: pointer; }
.bigwins-banner-chip-link:hover .bigwins-chip-game { color: #fff; }
.bigwins-banner-link {
  background: none; border: none;
  color: var(--orange);
  font-size: .78rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  padding: 0; font-family: inherit;
}
.bigwins-banner-link:hover { color: #fb923c; }

/* ── Filters bar ──────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .9rem;
  align-items: center;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin: 0 1.5rem .85rem;
  padding: .55rem 0;
  box-shadow: none;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 105px;
}
.filter-group label {
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
}
.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="email"],
.filter-group input[type="password"],
.filter-group input[type="number"],
.filter-group input[type="tel"],
.filter-group input[type="date"] {
  padding: .32rem 0 .35rem;
  border: none;
  border-bottom: 1.5px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: .85rem;
  outline: none;
  transition: border-color .12s;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
}
.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .2rem center;
  padding-right: 1.2rem;
}
.filter-group select:focus, .filter-group input:focus {
  border-color: var(--orange);
  box-shadow: none;
}
.filter-group select:focus-visible, .filter-group input:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 2px;
}

.filter-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .45rem;
  margin-left: auto;
  padding-left: .9rem;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  align-self: stretch;
  padding-top: .2rem;
}

.btn-apply-filters {
  background: var(--orange);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  padding: .48rem 1rem;
  font-size: .82rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: .4rem;
  cursor: pointer; font-family: inherit;
  transition: background .12s, box-shadow .12s;
  box-shadow: 0 3px 10px rgba(249,115,22,0.3);
}
.btn-apply-filters:hover { background: var(--orange-dark); }

.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { flex: 1; padding-right: 2.4rem !important; }
.pw-toggle {
  position: absolute; right: .6rem;
  background: none; border: none;
  cursor: pointer; padding: 0;
  color: var(--text-muted);
  display: flex; align-items: center;
  transition: color .12s;
}
.pw-toggle:hover { color: var(--orange); }
.pw-toggle svg { width: 16px; height: 16px; }

/* Toggle pills */
.toggle-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: var(--text-muted);
  cursor: pointer; user-select: none;
  padding: .38rem .65rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  transition: border-color .12s, color .12s;
  white-space: nowrap;
}
.toggle-pill:has(input:checked) { border-color: var(--orange); color: var(--orange); }
.toggle-pill input { display: none; }

/* ── Table section ────────────────────────────────── */
.table-section { margin: 0 1.5rem 2rem; }
.table-meta {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: .5rem; margin-bottom: .55rem;
  font-size: .83rem; color: var(--text-muted); font-weight: 600;
}
.table-legend { display: flex; gap: .45rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .18rem .55rem;
  border-radius: 20px;
  font-size: .69rem; font-weight: 700;
}
.badge::before { content: '●'; font-size: .5rem; }
.badge-green  { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(34,197,94,0.25); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.25); }
.badge-red    { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(239,68,68,0.25); }

.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: live-dot-pulse 1.1s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes live-dot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

.cf-funnel-stage {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .55rem;
  border-radius: 6px;
  font-size: .78rem;
  border: 1px solid transparent;
}
.cf-funnel-stage .cf-funnel-sym {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cf-funnel-yes { background: var(--green-dim);   color: var(--green);   border-color: rgba(34,197,94,0.25); }
.cf-funnel-no  { background: var(--red-dim);     color: var(--red);     border-color: rgba(239,68,68,0.25); }
.cf-funnel-unk { background: rgba(148,163,184,0.18); color: var(--text-muted); border-color: rgba(148,163,184,0.3); }

/*
 * STICKY HEADER CONTRACT — do not change without reading this.
 *
 * .table-scroll is intentionally the scroll container for the table (overflow:auto
 * with a fixed max-height). This is the ONLY reliable way to get sticky thead
 * inside a horizontally-scrollable table.
 *
 * Why: CSS forces overflow-y:auto whenever overflow-x is non-visible, making any
 * div with overflow-x:auto a scroll container. Sticky children then reference that
 * container — and if it has no fixed height it never scrolls, so sticky silently
 * does nothing. The fix is to own the vertical scroll here and use top:0 on th.
 *
 * DO NOT:
 *   - add overflow:hidden/clip-path to .table-scroll (breaks sticky)
 *   - move overflow-x to a parent and remove overflow-y here (breaks sticky)
 *   - change thead th top: back to var(--header-h) (wrong reference frame)
 */
.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 360px);
  min-height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 860px; }

thead th {
  position: sticky;
  top: 0; /* relative to .table-scroll — see contract above */
  z-index: 10;
  padding: .6rem .75rem;
  text-align: left;
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, #f0f4fb 0%, #edf0f7 100%);
}
thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
thead th:hover { color: var(--text); }
thead th.active { color: var(--orange); }

tbody tr {
  border-bottom: 1px solid #f0f3f8;
  transition: background .08s;
  cursor: pointer;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(249,115,22,0.04); }
tbody tr:nth-child(even) { background: rgba(0,0,0,.012); }
tbody tr:nth-child(even):hover { background: rgba(249,115,22,0.04); }

td { padding: .55rem .75rem; vertical-align: middle; white-space: nowrap; color: var(--text); }

/* Combined game cell */
.game-cell { display: flex; align-items: center; gap: .6rem; }
.game-name { font-weight: 600; color: var(--text); }

/* EV text coloring */
.ev-positive { color: var(--green); font-weight: 700; }
.ev-near     { color: var(--yellow); font-weight: 600; }
.ev-mid      { color: var(--blue); }
.ev-low      { color: var(--text-muted); }

/* ── Freemium gating ──────────────────────────────────────────────────────── */
/* Universal blur for Return %, EV $, and stock labels when the user is free.
   The numbers stay rendered (so layout is stable) but become unreadable; a
   click anywhere on the blurred element opens the paywall. */
.gated-blur {
  filter: blur(5px);
  cursor: pointer;
  user-select: none;
  display: inline-block;
  position: relative;
  transition: filter .15s ease;
}
.gated-blur:hover { filter: blur(4px); }
.gated-blur::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85em;
  filter: none;
  opacity: .85;
  pointer-events: none;
}

/* Marker for premium strategy options in the strategy dropdown. */
.strat-premium-opt::before { content: "🔒 "; }

/* Full paywall overlay over the EV table for free users. Covers everything
   below the headers — they see the column names (Return %, Net EV, $1M+
   Odds…) but can't see the ranked rows. */
.table-section { position: relative; }
.ev-table-paywall {
  position: absolute;
  left: 0; right: 0;
  /* Sit below the table-meta but cover the table itself. */
  top: 3rem; bottom: 0;
  background:
    linear-gradient(180deg, rgba(15,15,30,0.55) 0%, rgba(15,15,30,0.92) 30%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 20;
  padding: 3rem 1.5rem 4rem;
  border-radius: 12px;
}
.ev-table-paywall-card {
  background: var(--card, #fff);
  border: 2px solid var(--orange, #f97316);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 4px 14px rgba(249,115,22,0.25);
}
.ev-table-paywall-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: .85rem;
}
.ev-table-paywall-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
  color: var(--text, #111);
}
.ev-table-paywall-sub {
  font-size: .95rem;
  line-height: 1.45;
  color: var(--text-muted, #666);
  margin-bottom: 1.4rem;
}
.ev-table-paywall-btn {
  background: linear-gradient(135deg, #fb923c, var(--orange, #f97316));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  width: 100%;
  margin-bottom: .6rem;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 18px rgba(249,115,22,0.35);
}
.ev-table-paywall-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(249,115,22,0.45); }
.ev-table-paywall-link {
  background: none;
  border: none;
  color: var(--text-muted, #666);
  cursor: pointer;
  font-size: .85rem;
  text-decoration: underline;
  padding: .35rem .5rem;
}
.ev-table-paywall-link:hover { color: var(--orange, #f97316); }

/* Inline paywall card rendered inside #strategyTiles when a free user is on
   the Positive EV (tile) view. Spans the grid and centers a CTA card. */
.strat-ev-paywall {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  min-height: 380px;
  background:
    radial-gradient(ellipse at top, rgba(249,115,22,0.12) 0%, transparent 60%),
    var(--card-bg, #fff);
  border-radius: 16px;
  border: 1px dashed rgba(249,115,22,0.35);
  text-align: center;
  flex-direction: column;
  gap: 0;
}
.strat-ev-paywall-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.strat-ev-paywall-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: .6rem;
  color: var(--text, #111);
}
.strat-ev-paywall-sub {
  font-size: .98rem;
  line-height: 1.5;
  color: var(--text-muted, #666);
  max-width: 480px;
  margin: 0 auto 1.6rem;
}
.strat-ev-paywall-btn {
  background: linear-gradient(135deg, #fb923c, var(--orange, #f97316));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .95rem 2rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  margin-bottom: .65rem;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 18px rgba(249,115,22,0.35);
}
.strat-ev-paywall-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(249,115,22,0.45); }
.strat-ev-paywall-link {
  background: none;
  border: none;
  color: var(--text-muted, #666);
  cursor: pointer;
  font-size: .85rem;
  text-decoration: underline;
  padding: .3rem .5rem;
}
.strat-ev-paywall-link:hover { color: var(--orange, #f97316); }

/* Return bars — always orange in this design */
.return-bar-wrap { display: flex; align-items: center; gap: .5rem; }
.return-bar {
  height: 7px; border-radius: 4px;
  background: #e9ecf4;
  min-width: 44px; width: 80px;
  overflow: hidden;
}
.return-bar-fill {
  height: 100%; border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%, rgba(0,0,0,0.07) 100%),
    linear-gradient(90deg, #fb923c, var(--orange));
  transition: width .3s;
}
/* Override EV-based colors — all orange */
.ev-positive .return-bar-fill,
.ev-near     .return-bar-fill,
.ev-mid      .return-bar-fill {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%, rgba(0,0,0,0.07) 100%),
    linear-gradient(90deg, #fb923c, var(--orange));
}

/* State circle badges */
.state-pill {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: .64rem; font-weight: 800; letter-spacing: .02em;
  color: #fff; flex-shrink: 0;
  background: var(--grape);
}
.state-MA { background: #ef4444; }
.state-CT { background: #3b82f6; }
.state-VT { background: #10b981; }
.state-ME { background: #f59e0b; }
.state-RI { background: #ec4899; }
.state-NH { background: #0f766e; }
.state-NY { background: #8b5cf6; }
.state-NJ { background: #f97316; }
.state-PA { background: #6366f1; }
.state-VA { background: #16a34a; }
.state-FL { background: #0ea5e9; }
.state-TX { background: #a855f7; }
.state-CA { background: #f43f5e; }
.state-IL { background: #06b6d4; }
.state-OH { background: #fb923c; }
.state-AZ { background: #1d4ed8; }
.state-DC { background: #7c3aed; }
.state-GA { background: #9333ea; }
.state-WA { background: #0284c7; }
.state-CO { background: #16a34a; }
.state-MN { background: #7e22ce; }
.state-MI { background: #b45309; }
.state-WI { background: #065f46; }
.state-OR { background: #b91c1c; }
.state-IN { background: #1e40af; }
.state-MO { background: #6d28d9; }
.state-NC { background: #0369a1; }
.state-TN { background: #c2410c; }
.state-SC { background: #15803d; }
.state-MD { background: #5b21b6; }
.state-KY { background: #1d4ed8; }
.state-LA { background: #9d174d; }
.state-OK { background: #b45309; }
.state-AR { background: #991b1b; }
.state-MS { background: #1a56db; }
.state-KS { background: #7e22ce; }
.state-IA { background: #15803d; }
.state-NE { background: #b91c1c; }
.state-SD { background: #0369a1; }
.state-ND { background: #92400e; }
.state-MT { background: #1e40af; }
.state-WY { background: #166534; }
.state-ID { background: #6d28d9; }
.state-NV { background: #c2410c; }
.state-UT { background: #0f766e; }
.state-NM { background: #d97706; }
.state-AK { background: #0284c7; }
.state-HI { background: #be185d; }
.state-DE { background: #3730a3; }
.state-WV { background: #854d0e; }

/* Price — no pill, just styled text */
.price-cell { font-weight: 600; color: var(--text); font-family: 'JetBrains Mono', monospace; }

/* Backwards-compat: old price-pill still styled nicely */
.price-pill { font-weight: 600; color: var(--text); }

.loading-cell { text-align: center; padding: 3rem; color: var(--text-muted); font-size: .88rem; }

/* ── Modal ────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: flex-start; justify-content: center;
  padding: 2rem 1rem; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 820px;
  padding: 2rem; position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  overflow: hidden;
}
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
}
.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .95rem;
  cursor: pointer; padding: .25rem .55rem; border-radius: 20px;
  font-weight: 600; transition: background .1s; font-family: inherit;
}
.modal-close:hover { background: var(--border); }

.modal-ticket-img { display: block; max-height: 160px; max-width: 100%; object-fit: contain; margin: 0 auto .75rem; border-radius: 8px; }
.modal-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; margin-top: .25rem; }
.modal-state { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.2rem; font-weight: 600; }
.modal-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: .6rem; margin-bottom: 1.35rem; }
.modal-stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; }
.modal-stat-val { font-size: 1.15rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.modal-stat-lbl { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin-top: .2rem; font-weight: 700; }
.modal-stat-note { font-size: .62rem; color: var(--text-muted); margin-top: .2rem; font-style: italic; opacity: .7; }

.prize-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.prize-table th { background: var(--bg); padding: .5rem .8rem; text-align: left; font-size: .69rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--text-muted); }
.prize-table td { padding: .44rem .8rem; border-bottom: 1px solid var(--border); }
.prize-table tr:last-child td { border-bottom: none; }
.prize-table tr:nth-child(even) td { background: rgba(0,0,0,.02); }

/* ── Auth modal ───────────────────────────────────── */
.auth-modal { max-width: 420px; }
.auth-tabs { display: flex; border-bottom: 1.5px solid var(--border); margin-bottom: 1.2rem; }
.auth-tab { flex: 1; background: none; border: none; color: var(--text-muted); font-size: .86rem; font-weight: 600; padding: .58rem; cursor: pointer; border-bottom: 2px solid transparent; transition: color .12s, border-color .12s; font-family: inherit; }
.auth-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.auth-subtitle { font-size: .82rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; }
.auth-submit { width: 100%; justify-content: center; background: var(--orange); color: #fff; border: none; font-weight: 700; font-size: .88rem; padding: .52rem; border-radius: var(--radius-sm) !important; }
.auth-submit:hover { background: var(--orange-dark); }

/* ── Hunt layout ──────────────────────────────────── */
.hunt-layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.hunt-main { flex: 1; overflow: auto; padding: 1.25rem 1.5rem; }

/* Chase masthead — editorial section header */
.chase-masthead {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: .25rem 0 .85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.chase-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--orange);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}
.chase-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(249,115,22,.55);
}

/* State picker dropdown */
.state-dd-wrap { position: relative; display: inline-block; margin: 0; }
.state-dd-trigger {
  display: flex; align-items: center; gap: .6rem;
  background: transparent; border: none;
  padding: 0; cursor: pointer; color: var(--text);
  transition: color .15s;
}
.state-dd-trigger:hover { color: var(--orange); }
.state-dd-trigger:hover .state-dd-chevron { color: var(--orange); }
.state-abbr-pill {
  background: var(--orange); color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; font-weight: 800;
  border-radius: 4px; padding: 3px 7px;
  letter-spacing: .06em;
  align-self: center;
}
.state-dd-trigger-name { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }

.chase-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  color: var(--text-muted);
  font-size: .8rem;
}
.chase-meta strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.chase-meta-lbl { font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.state-dd-chevron { color: var(--text-muted); font-size: .95rem; margin-left: .05rem; transition: color .15s; }
.state-dd-panel { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 370px; overflow-y: auto; background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.35); z-index: 200; padding: .35rem 0; }
.state-dd-group-lbl { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: .5rem .85rem .25rem; opacity: .6; }
.state-dd-item { display: flex; align-items: center; gap: .5rem; width: 100%; background: none; border: none; padding: .45rem .85rem; cursor: pointer; font-size: .82rem; color: var(--text-muted); transition: background .1s, color .1s; text-align: left; }
.state-dd-item:hover { background: var(--bg); color: var(--text); }
.state-dd-item.active { background: var(--orange-dim); color: var(--orange); font-weight: 600; }
.state-abbr { width: 28px; height: 20px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 4px; font-size: .62rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted); }
.state-dd-item.active .state-abbr { background: var(--orange); border-color: var(--orange); color: #fff; }
.state-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 4px var(--green); flex-shrink: 0; }
.state-dd-soon { opacity: .45; }

.soon-state-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.soon-state-header h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.soon-state-header p { font-size: .82rem !important; }
.hunt-soon-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: .65rem; }
.hunt-soon-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.hunt-soon-table thead th { text-align: left; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); padding: .55rem .8rem; border-bottom: 1px solid var(--border); }
.hunt-soon-table tbody td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; color: var(--text-muted); }
.hunt-soon-table tbody td:first-child { font-family: inherit; color: var(--text); }
.hunt-soon-table tbody tr:hover td { background: var(--bg); }
.hunt-soon-empty { padding: 2rem; text-align: center; color: var(--text-muted); font-size: .9rem; border: 1px dashed var(--border); border-radius: 8px; }

/* ── Caller tab ────────────────────────────────────── */
.caller-form-section { padding: 0 1.5rem 1rem; }
.caller-form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-card); }
.caller-form-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .3rem; }
.caller-form-subtitle { font-size: .8rem; color: var(--text-muted); margin-bottom: .95rem; line-height: 1.5; }
.caller-form-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.caller-msg { font-size: .81rem; padding: .5rem .8rem; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); }
.cf-tickets-wrap { margin-top: 1rem; }
.cf-tickets-card { border: 1.5px solid var(--border); border-radius: 8px; background: #fff; padding: .5rem; }
.cf-tickets-card input[type=text] { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: .45rem .65rem; font-family: inherit; font-size: .85rem; outline: none; margin-bottom: .4rem; }
.cf-tickets-card input[type=text]:focus { border-color: var(--orange); }
.cf-tickets-list { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.cf-ticket-row { display: flex; align-items: center; gap: .55rem; padding: .35rem .55rem; border-radius: 6px; cursor: pointer; font-size: .85rem; user-select: none; }
.cf-ticket-row:hover { background: var(--bg); }
.cf-ticket-row input[type=checkbox] { margin: 0; cursor: pointer; }
.cf-ticket-row .cf-ticket-price { color: var(--text-muted); margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: .78rem; }
.cf-view-btn { background: #fff; color: var(--text-muted); }
.cf-view-btn:hover { background: var(--bg); color: var(--text); }
.cf-view-btn.cf-view-active { background: var(--orange); color: #fff; }
.cf-view-btn.cf-view-active:hover { background: var(--orange); color: #fff; }
.cf-store-marker { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); cursor: pointer; transition: box-shadow .2s ease, border-color .2s ease; }
.cf-store-marker.selected { border: 2px solid #15803d; box-shadow: 0 0 0 2px rgba(34,197,94,.45); }
.cf-store-marker.status-in_stock { border-color: #166534; }
.cf-store-marker.status-voicemail { border-color: #7e22ce; }
.cf-store-marker.status-no_answer { border-color: #991b1b; }
.cf-store-marker.pulse { animation: cfMarkerPulse 1.4s ease-in-out infinite; }
@keyframes cfMarkerPulse {
  0%   { box-shadow: 0 0 0 0   rgba(251,191,36,.85), 0 0 0 1px rgba(0,0,0,.25); }
  70%  { box-shadow: 0 0 0 10px rgba(251,191,36,0),    0 0 0 1px rgba(0,0,0,.25); }
  100% { box-shadow: 0 0 0 0   rgba(251,191,36,0),    0 0 0 1px rgba(0,0,0,.25); }
}
.cf-list-status-pulse { animation: cfBadgePulse 1.4s ease-in-out infinite; }
@keyframes cfBadgePulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* In-stock dot for the public inventory/state maps — larger, brighter, pulsing
   so green markers actually catch the eye against the tile background. Stays
   smaller than the .hit-marker pin since these cluster densely. */
.sf-dot-instock { background: transparent; border: none; }
.sf-dot-instock-inner {
  display: block;
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #4dff9a, #00b34d);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.4), 0 2px 5px rgba(0,0,0,.35),
              0 0 0 0 rgba(0,200,80,.65);
  animation: sfDotInstockPulse 2.1s ease-in-out infinite;
}
@keyframes sfDotInstockPulse {
  0%   { box-shadow: 0 0 0 1.5px rgba(0,0,0,.4), 0 2px 5px rgba(0,0,0,.35), 0 0 0 0   rgba(0,200,80,.65); }
  70%  { box-shadow: 0 0 0 1.5px rgba(0,0,0,.4), 0 2px 5px rgba(0,0,0,.35), 0 0 0 10px rgba(0,200,80,0); }
  100% { box-shadow: 0 0 0 1.5px rgba(0,0,0,.4), 0 2px 5px rgba(0,0,0,.35), 0 0 0 0   rgba(0,200,80,0); }
}

/* "Has It" pin for the campaign detail map — big and unmissable. */
.hit-marker { background: transparent; border: none; }
.hit-marker-inner {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #00ff9c, #00b86b);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.35),
              0 0 0 0 rgba(0,255,136,.7);
  color: #002a14;
  font-weight: 900; font-size: 1.15rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  animation: hitMarkerPulse 1.8s ease-in-out infinite;
}
@keyframes hitMarkerPulse {
  0%   { box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.35), 0 0 0 0   rgba(0,255,136,.7); }
  70%  { box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.35), 0 0 0 14px rgba(0,255,136,0); }
  100% { box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.35), 0 0 0 0   rgba(0,255,136,0); }
}
/* Neutralize the default leaflet-cluster orange/yellow/green styling so our
   custom donut renders cleanly. The default CSS targets .marker-cluster div
   with fixed width/height/border-radius — strip it. */
.cf-cluster-wrap,
.cf-cluster-wrap.marker-cluster,
.cf-cluster-wrap.marker-cluster-small,
.cf-cluster-wrap.marker-cluster-medium,
.cf-cluster-wrap.marker-cluster-large {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.cf-cluster-wrap > div,
.cf-cluster-wrap.marker-cluster > div,
.cf-cluster-wrap.marker-cluster-small > div,
.cf-cluster-wrap.marker-cluster-medium > div,
.cf-cluster-wrap.marker-cluster-large > div {
  background: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 50% !important;
}
.cf-cluster { transition: transform .15s ease; }
.cf-cluster:hover { transform: scale(1.05); }
.cf-cluster.pulse { animation: cfClusterPulse 1.6s ease-in-out infinite; }
@keyframes cfClusterPulse {
  0%   { box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 0   rgba(251,191,36,.7); }
  70%  { box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 14px rgba(251,191,36,0); }
  100% { box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 0   rgba(251,191,36,0); }
}
.cf-tickets-empty { color: var(--text-muted); padding: .6rem; font-size: .85rem; text-align: center; }
.cf-ticket-result { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.cf-ticket-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.4; max-width: 220px; }
.cf-ticket-pill .cf-pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.cf-ticket-pill.yes { background: rgba(34,197,94,0.14);  color: #166534; }
.cf-ticket-pill.no  { background: rgba(239,68,68,0.12); color: #991b1b; }
.cf-ticket-pill.unk { background: var(--bg);             color: var(--text-muted); }
.cf-ticket-pill .cf-pill-mark { font-weight: 700; }
.cf-summary-link { cursor: pointer; color: var(--text); border-bottom: 1px dotted var(--text-muted); }
.cf-summary-link:hover { color: var(--orange); border-bottom-color: var(--orange); }
.cf-col-filter-row th {
  position: static;
  background: var(--bg);
  padding: .3rem .4rem;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  cursor: default;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.cf-col-filter {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: .72rem;
  padding: .22rem .4rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  color: var(--text);
  font-weight: 400;
}
.cf-col-filter:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px rgba(249,115,22,0.18); }
.cf-col-filter::placeholder { color: var(--text-muted); opacity: .6; }
.cf-col-filter-clear {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  font-size: .85rem;
  padding: .15rem .4rem;
  line-height: 1;
}
.cf-col-filter-clear:hover { color: #dc2626; border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); }
.call-detail-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.55); z-index: 9000; align-items: center; justify-content: center; padding: 1.5rem; }
.call-detail-backdrop.show { display: flex; }
.call-detail-card { background: var(--card); border-radius: 12px; max-width: 760px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 1.6rem 1.7rem; position: relative; box-shadow: 0 16px 48px rgba(0,0,0,0.32); }
.call-detail-close { position: absolute; top: .6rem; right: .85rem; background: transparent; border: none; font-size: 1.6rem; line-height: 1; color: var(--text-muted); cursor: pointer; padding: .2rem .45rem; border-radius: 6px; }
.call-detail-close:hover { color: var(--text); background: var(--bg); }
.call-detail-header { display: flex; flex-direction: column; gap: .35rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.call-detail-title { font-size: 1.1rem; font-weight: 700; }
.call-detail-meta { font-size: .8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 1rem; }
.call-detail-section { margin-top: 1.1rem; }
.call-detail-section-label { font-size: .68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.call-detail-summary { font-size: .9rem; color: var(--text); line-height: 1.55; background: var(--bg); border-radius: 8px; padding: .75rem .95rem; }
.call-detail-transcript { font-family: 'JetBrains Mono', monospace; font-size: .8rem; line-height: 1.6; white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .85rem 1rem; max-height: 380px; overflow-y: auto; color: var(--text); }
.call-detail-transcript .speaker-ai   { color: var(--orange); font-weight: 600; }
.call-detail-transcript .speaker-user { color: #2563eb; font-weight: 600; }
.caller-campaigns-list { display: flex; flex-direction: column; gap: .65rem; }
.campaign-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.15rem; transition: border-color .12s; box-shadow: var(--shadow-card); }
.campaign-card:hover { border-color: var(--orange); }

.btn-call-create { background: var(--orange); color: #fff; border: none; font-weight: 700; }
.btn-call-create:hover { background: var(--orange-dark); }
.btn-csv, .btn-heatmap { color: var(--text-muted); }
.btn-csv:hover, .btn-heatmap:hover { color: var(--text); }
.btn-report { color: var(--orange); border-color: rgba(249,115,22,.3); }
.btn-report:hover { background: var(--orange-dim); }

/* ── Big Wins page ────────────────────────────────── */
.bigwins-page { padding: 1.25rem 1.5rem; }
.bigwins-page-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.2rem; }
.bigwins-page-title { font-size: 1.25rem; font-weight: 800; margin-bottom: .2rem; }
.bigwins-page-sub { font-size: .81rem; color: var(--text-muted); }
.bigwins-header-right { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.bigwins-state-filter { padding: .38rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: .81rem; font-family: inherit; outline: none; appearance: none; }
.bigwins-page-count { font-size: .81rem; color: var(--text-muted); }
.bigwins-loading { color: var(--text-muted); padding: 2rem; text-align: center; }
.bigwins-list { display: grid; gap: .6rem; }

/* List/Map toggle */
.bigwins-view-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.bigwins-view-btn { padding: .38rem .85rem; border: none; background: transparent; color: var(--text-muted); font-size: .81rem; font-weight: 600; font-family: inherit; cursor: pointer; letter-spacing: .02em; }
.bigwins-view-btn + .bigwins-view-btn { border-left: 1.5px solid var(--border); }
.bigwins-view-btn.is-active { background: var(--orange); color: #fff; }
.bigwins-view-btn:not(.is-active):hover { background: var(--orange-dim); color: var(--orange-dark); }

/* Map view */
.bigwins-map-wrap { display: flex; flex-direction: column; gap: .55rem; }
.bigwins-map-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .9rem; }
.bigwins-map-stats { font-size: .78rem; color: var(--text-muted); }
.bigwins-map-stats strong { color: var(--text); }
.bigwins-map-legend { display: inline-flex; flex-wrap: wrap; gap: .35rem .75rem; font-size: .72rem; color: var(--text-muted); }
.bigwins-legend-item { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.bigwins-legend-swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.bigwins-legend-swatch.is-retailer { background: #f48c06; border: 1.5px solid #7a2a00; }
.bigwins-legend-swatch.is-home { background: #60a5fa; border: 1.5px solid #1e40af; }
.bigwins-map { width: 100%; height: 560px; border-radius: var(--radius-md); border: 1.5px solid var(--border); overflow: hidden; }
.bigwins-map-empty { color: var(--text-muted); padding: 2rem; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius-md); }
.bigwins-popup { font-family: inherit; font-size: .8rem; min-width: 180px; }
.bigwins-popup .bp-retailer { font-weight: 700; font-size: .9rem; margin-bottom: .15rem; }
.bigwins-popup .bp-city { color: var(--text-muted); margin-bottom: .5rem; font-size: .76rem; }
.bigwins-popup ul { list-style: none; padding: 0; margin: 0; max-height: 200px; overflow-y: auto; }
.bigwins-popup li { padding: .35rem 0; border-top: 1px solid rgba(0,0,0,.08); font-size: .78rem; line-height: 1.35; }
.bigwins-popup li:first-child { border-top: none; }
.bigwins-popup .bp-prize { color: var(--orange-dark); font-weight: 700; }
.bigwins-popup .bp-game-link { color: var(--blue); cursor: pointer; text-decoration: none; }
.bigwins-popup .bp-game-link:hover { text-decoration: underline; }
.bigwins-popup .bp-date { color: var(--text-muted); font-size: .72rem; }

/* ── Store dropdowns ──────────────────────────────── */
.store-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); z-index: 1001; max-height: 240px; overflow-y: auto; margin-top: 2px; }
.store-dropdown-item, .store-option { padding: .52rem .8rem; cursor: pointer; font-size: .83rem; border-bottom: 1px solid rgba(226,231,240,.7); transition: background .12s, color .12s; }
.store-dropdown-item:hover, .store-option:hover { background: var(--orange-dim); color: var(--orange-dark); }
.store-dropdown-item:last-child, .store-option:last-child { border-bottom: none; }

.game-filter-combo { position: relative; display: flex; align-items: center; }
.game-filter-combo input { flex: 1; padding-right: 2rem !important; }
.game-filter-clear { position: absolute; right: .55rem; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: .83rem; padding: 0; font-family: inherit; }
.game-filter-clear:hover { color: var(--text); }

.selected-tag { display: inline-flex; align-items: center; gap: .35rem; background: var(--orange-dim); border: 1px solid rgba(249,115,22,.25); color: var(--orange); padding: .22rem .6rem; border-radius: 20px; font-size: .76rem; font-weight: 600; margin-top: .3rem; }

.report-count-badge { display: inline-block; margin-left: .4rem; padding: .1rem .4rem; border-radius: 10px; font-size: .68rem; font-weight: 600; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); vertical-align: middle; }

/* ── Misc ─────────────────────────────────────────── */
.badge-status-idle    { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; }
.badge-status-running { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,.25); display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; }

.game-report-badge { display: inline-flex; align-items: center; gap: .2rem; background: var(--orange-dim); border: 1px solid rgba(249,115,22,.2); color: var(--orange); padding: .1rem .38rem; border-radius: 20px; font-size: .66rem; font-weight: 700; margin-left: .4rem; }

.stock-btn { border-radius: 8px !important; font-size: .81rem !important; padding: .38rem .8rem !important; }
.stock-btn-active { background: var(--green-dim) !important; border-color: rgba(34,197,94,.35) !important; color: var(--green) !important; }

/* ── Game modal community + retailer sections ─────── */
.modal-community-section { margin-top: 1.2rem; }
.modal-retailer-section { margin-top: 1.2rem; }
.modal-community-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .65rem; }
.modal-community-gate { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .84rem; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; }
.profile-reports-list { display: flex; flex-direction: column; gap: .4rem; }
.profile-report-item { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem .75rem; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .8rem; font-size: .82rem; }
.profile-report-game { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-report-meta { grid-column: 1 / -1; font-size: .72rem; color: var(--text-muted); }
.profile-no-reports { font-size: .83rem; color: var(--text-muted); text-align: center; padding: .9rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.report-location-link { color: inherit; text-decoration: none; }
.report-location-link:hover { color: var(--orange); text-decoration: underline; }

/* Retailer-confirmed stock list */
.retailer-stock-list { display: flex; flex-direction: column; gap: .35rem; }
.retailer-stock-row { display: flex; align-items: center; gap: .6rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .8rem; font-size: .83rem; }
.retailer-stock-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-in  { background: var(--green); box-shadow: 0 0 5px rgba(34,197,94,.4); }
.dot-out { background: var(--red); }
.retailer-stock-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.retailer-stock-city { font-weight: 400; color: var(--text-muted); font-size: .77rem; margin-left: .3rem; }
.retailer-stock-status { font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.retailer-stock-status.status-in  { color: var(--green); }
.retailer-stock-status.status-out { color: var(--red); }
.retailer-stock-time { font-size: .72rem; color: var(--text-muted); flex-shrink: 0; }

.modal-view-all-chase {
  display: block;
  width: 100%;
  margin-top: .55rem;
  padding: .55rem .8rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--orange);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.modal-view-all-chase:hover {
  background: var(--orange-dim);
  border-color: var(--orange);
  border-style: solid;
}

.modal-chase-link-row {
  margin: 0 0 .9rem;
}
.modal-chase-link {
  color: var(--orange);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .12s;
}
.modal-chase-link:hover {
  border-bottom-color: var(--orange);
}

.store-profile-tr td { padding: 0; background: var(--bg) !important; }
.store-profile-open > td:first-child { border-left: 3px solid var(--orange); }

/* ── Per-store inventory toggle panel ────────────────────────────────────── */
.inv-panel { background: var(--card); }
.inv-panel-hd { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.inv-panel-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.inv-summary { font-size: .77rem; color: var(--text-muted); display: flex; align-items: center; gap: .35rem; }

.inv-login-banner { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding: .55rem 1rem; background: var(--orange-dim); border-bottom: 1px solid rgba(249,115,22,.15); font-size: .79rem; color: var(--text-muted); }

.inv-filter-row { display: flex; gap: .35rem; padding: .5rem .75rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.inv-filter-tab { padding: .24rem .65rem; border-radius: 20px; border: 1.5px solid var(--border); background: transparent; color: var(--text-muted); font-size: .74rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: border-color .12s, background .12s, color .12s; }
.inv-filter-tab.active { border-color: var(--mint); background: var(--mint); color: #fff; }

.inv-game-list { max-height: 380px; overflow-y: auto; background: var(--bg); }
.inv-game-row { display: flex; align-items: stretch; background: var(--card); border-bottom: 1px solid var(--border); }
.inv-game-row[data-game-status="in"] { background: rgba(16,185,129,.03); }
.inv-game-row[data-game-status="out"] { background: rgba(239,68,68,.03); }

.inv-accent { width: 4px; flex-shrink: 0; }
.acc-in  { background: var(--mint); }
.acc-out { background: var(--red); }
.acc-none { background: var(--border); }

.inv-game-body { flex: 1; padding: .6rem .85rem; min-width: 0; }
.inv-game-top { display: flex; align-items: center; gap: .65rem; }
.inv-game-info { flex: 1; min-width: 0; }
.inv-game-name { font-size: .83rem; font-weight: 700; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-game-meta { font-size: .73rem; color: var(--text-muted); display: block; margin-top: 1px; }

.inv-btn-grp { display: flex; gap: .28rem; flex-shrink: 0; }
.inv-btn { padding: .28rem .58rem; border-radius: 7px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text-muted); font-size: .72rem; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; transition: border-color .1s, background .1s, color .1s; }
.inv-btn:hover { border-color: var(--text-dim); color: var(--text); }
.inv-btn.is-in  { border-color: var(--mint); background: var(--mint); color: #fff; }
.inv-btn.is-out { border-color: var(--red);  background: var(--red);  color: #fff; }
.inv-btn:disabled { opacity: .45; cursor: default; }

.inv-upd { font-size: .69rem; color: var(--text-muted); font-style: italic; margin-top: .38rem; }
.inv-no-games { padding: 1.1rem; text-align: center; color: var(--text-muted); font-size: .83rem; }

/* Inventory-source provenance pills. Three buckets: ScratchFrenzy (verified by
   automation or staff), Store (retailer dashboard), User (member report). */
.inv-src {
  display: inline-flex; align-items: center; gap: .2rem;
  font-size: .62rem; font-weight: 700; font-style: normal;
  text-transform: uppercase; letter-spacing: .04em;
  padding: .12rem .42rem; border-radius: 999px;
  border: 1px solid transparent; line-height: 1.4; vertical-align: middle;
  white-space: nowrap;
}
.inv-src-sf    { background: rgba(124, 58, 237, .12); color: #7c3aed; border-color: rgba(124, 58, 237, .35); }
.inv-src-store { background: rgba(37, 99, 235, .12);  color: #2563eb; border-color: rgba(37, 99, 235, .35);  }
.inv-src-user  { background: rgba(107, 114, 128, .14); color: var(--text-muted); border-color: rgba(107, 114, 128, .3); }

/* ── Toast (non-blocking notifications) ─────────────────────────────────── */
.sf-toast-stack { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.sf-toast { pointer-events: auto; min-width: 260px; max-width: 380px; padding: .7rem .9rem; border-radius: 10px; background: var(--card); border: 1.5px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: .83rem; color: var(--text); display: flex; align-items: flex-start; gap: .55rem; animation: sf-toast-in .2s ease-out; }
.sf-toast.err { border-color: var(--red); background: #fff5f5; }
.sf-toast.ok  { border-color: var(--mint); background: #f0fdf6; }
.sf-toast-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.2; }
.sf-toast-body { flex: 1; line-height: 1.35; }
.sf-toast-close { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0 .15rem; font-family: inherit; }
.sf-toast.fade-out { animation: sf-toast-out .2s ease-in forwards; }
@keyframes sf-toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes sf-toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(20px); } }

/* ── Inventory notes bottom-sheet modal ──────────────────────────────────── */
.inv-notes-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.45); display: none; align-items: flex-end; justify-content: center; }
.inv-notes-overlay.open { display: flex; }
.inv-notes-sheet { background: var(--card); border-radius: 20px 20px 0 0; width: 100%; max-width: 520px; padding: 1.1rem 1.35rem 2rem; box-shadow: 0 -8px 32px rgba(0,0,0,.14); }
.inv-notes-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto .85rem; }
.inv-notes-title { font-size: .97rem; font-weight: 700; margin-bottom: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-notes-lbl { font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .42rem; display: block; }
.inv-notes-stock-row { display: flex; gap: .55rem; margin-bottom: .95rem; }
.inv-notes-stock-btn { flex: 1; padding: .52rem; border-radius: 8px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text-muted); font-size: .82rem; font-weight: 600; cursor: pointer; font-family: inherit; text-align: center; transition: all .12s; }
.inv-notes-stock-btn.is-in  { border-color: var(--mint); background: var(--mint); color: #fff; }
.inv-notes-stock-btn.is-out { border-color: var(--red);  background: var(--red);  color: #fff; }
.inv-notes-textarea { width: 100%; min-height: 70px; padding: .65rem .8rem; border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: .87rem; font-family: inherit; resize: vertical; margin-bottom: .95rem; }
.inv-notes-textarea:focus { outline: none; border-color: var(--orange); }
.inv-notes-submit { width: 100%; padding: .72rem; background: var(--orange); color: #fff; border: none; border-radius: 8px; font-size: .9rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .12s; }
.inv-notes-submit:hover { background: var(--orange-dark); }
.inv-notes-submit:disabled { opacity: .45; cursor: default; }

#callerDetailView { padding: 0 1.5rem 2rem; }
.link-btn { background: none; border: none; color: var(--orange); cursor: pointer; font-size: .81rem; font-family: inherit; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--orange-dark); }

.ma-map-section { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; z-index: 0; isolation: isolate; }
#maMap, #azMap, #flMap, #riMap, #gaMap, #nyMap, #vaMap, #dcMap, #vtMap, #genMap { height: 400px; }

/* ── My Plays ─────────────────────────────────────── */
.plays-log-section { margin: 0 1.5rem 1.25rem; }
.plays-log-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-card); }
.plays-log-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }
.plays-log-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.plays-log-state { display: flex; flex-direction: column; gap: .25rem; min-width: 160px; }
.plays-log-state label { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.plays-log-state select { padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: .9rem; cursor: pointer; }
.plays-log-row { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; position: relative; padding-right: 2rem; }
.plays-log-row + .plays-log-row { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--border); }
.pl-remove-btn { position: absolute; right: 0; bottom: .35rem; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text-muted); cursor: pointer; font-size: .75rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: color .12s, background .12s, border-color .12s; }
.pl-remove-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-dim); }
.plays-log-actions { display: flex; gap: .65rem; align-items: center; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.plays-log-actions .btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.plays-log-actions .btn-ghost:hover { background: var(--card-hover, rgba(0,0,0,.04)); }

.plays-chart-section { margin: 0 1.5rem 1.25rem; }
.plays-chart-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem .7rem; box-shadow: var(--shadow-card); }
.plays-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.plays-chart-title { font-size: .83rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.plays-svg { width: 100%; height: 120px; display: block; }

.plays-delete-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: .85rem; padding: .2rem .4rem; border-radius: 4px; transition: color .12s, background .12s; }
.plays-delete-btn:hover { color: var(--red); background: var(--red-dim); }

.plays-login-nudge { display: flex; align-items: center; justify-content: center; padding: 4rem 1.5rem; }
.plays-nudge-inner { text-align: center; max-width: 320px; }

@media (max-width: 700px) {
  .plays-log-section, .plays-chart-section { margin-left: 1rem; margin-right: 1rem; }
  .plays-log-row { flex-direction: column; padding-right: 0; }
  .pl-remove-btn { position: static; align-self: flex-end; margin-top: .3rem; }
  .plays-log-header { flex-direction: column; align-items: stretch; }
  .plays-log-actions { justify-content: stretch; }
  .plays-log-actions .btn { flex: 1; }
}

/* ── Footer ───────────────────────────────────────── */
footer { background: var(--card); border-top: 1px solid var(--border); padding: 1.4rem; text-align: center; }
.footer-legal { font-size: .7rem; color: var(--text-muted); line-height: 1.7; margin-bottom: .2rem; }
.footer-links { display: flex; justify-content: center; gap: 1.2rem; margin-top: .65rem; flex-wrap: wrap; }
.footer-links a { font-size: .76rem; color: var(--text-muted); text-decoration: none; transition: color .12s; }
.footer-links a:hover { color: var(--orange); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  :root { --header-h: 60px; --sidebar-w: 260px; }

  .sidebar-toggle { display: inline-flex; }
  .site-header { padding: 0 .85rem; gap: .7rem; }
  .logo-block { height: 44px; align-self: center; }
  .logo-img { height: 44px; max-height: 44px; width: auto; object-fit: contain; }
  .bigwins-banner, .bigwins-freshness { display: none !important; }

  .sidebar {
    position: fixed;
    left: 0; top: var(--header-h); bottom: 0;
    height: auto;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    z-index: 60;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,.4); }
  .sidebar-nav { padding-top: 1.1rem; }
  .sidebar-item { padding: .75rem .9rem; font-size: .92rem; }
  .sidebar-item svg { width: 17px; height: 17px; }

  body.sidebar-open { overflow: hidden; }

  .main-area { border-radius: 0; }
}

@media (max-width: 700px) {
  .stats-row { padding: .6rem .85rem .35rem; row-gap: .45rem !important; column-gap: .5rem; }
  .stat-cell, .stat-card { padding: .1rem .6rem; }
  .stat-value { font-size: 1.2rem; padding-bottom: .25rem; }
  .stat-value::after { width: 1.1rem; height: 2px; }
  .stat-label { font-size: .58rem; letter-spacing: .1em; margin-bottom: .1rem; }

  .filters-bar,
  .table-section,
  .bigwins-page,
  .ds-wrap,
  .caller-form-section,
  .hunt-main { padding-left: .85rem; padding-right: .85rem; }
  .filters-bar { margin-left: .85rem; margin-right: .85rem; padding: .7rem .8rem; gap: .5rem; }
  .table-section { margin-left: .85rem; margin-right: .85rem; }

  /* Filter groups: 2-column grid + full-width inputs */
  .filters-bar { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .filter-group { min-width: 0; }
  .filter-group select,
  .filter-group input[type="text"],
  .filter-group input[type="email"],
  .filter-group input[type="password"],
  .filter-group input[type="number"],
  .filter-group input[type="tel"],
  .filter-group input[type="date"] {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    padding: .55rem .75rem;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .filter-group select { background-position: right .6rem center; padding-right: 1.8rem; }
  .filter-group[style*="flex:1"] { grid-column: 1 / -1; }

  .filter-actions {
    grid-column: 1 / -1;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: .55rem;
    flex-wrap: wrap;
    gap: .4rem;
  }
  .btn-apply-filters { flex: 1; justify-content: center; }
  .toggle-pill { padding: .5rem .75rem; font-size: .8rem; }

  /* Table: shorter min-width and a real scroll height */
  table { min-width: 720px; font-size: .82rem; }
  td { padding: .55rem .55rem; }
  thead th { padding: .55rem .55rem; font-size: .62rem; }
  .table-scroll { max-height: calc(100vh - 280px); min-height: 240px; }

  /* Modals: full-bleed on phones */
  .modal-overlay { padding: 0; align-items: stretch; overflow: hidden; }
  .modal {
    border-radius: 0;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1rem 2rem;
  }
  .auth-modal { height: auto; min-height: auto; overflow: visible; border-radius: var(--radius); margin: 1rem; max-width: 100%; }
  .modal-close { position: fixed; top: .8rem; right: .8rem; z-index: 10; }

  /* Hunt layout: collapse to single column on mobile */
  .hunt-layout { flex-direction: column; }
  .hunt-main { padding: .9rem .85rem 1.5rem; }
  .chase-masthead { gap: .5rem; padding-bottom: .65rem; margin-bottom: .8rem; }
  .state-dd-trigger-name { font-size: 1.2rem; }
  #maMap, #azMap, #flMap, #riMap, #gaMap, #nyMap, #vaMap, #dcMap, #vtMap, #genMap { height: 280px; }
  .hunt-soon-games { grid-template-columns: 1fr; }
  .hunt-soon-table { font-size: .8rem; }
  .hunt-soon-table thead th, .hunt-soon-table tbody td { padding: .5rem .55rem; }

  /* Data status table */
  .ds-table { font-size: .78rem; }
  .ds-table thead th, .ds-state-row td { padding: .45rem .5rem; }

  /* Footer breathing room */
  footer { padding: 1rem .85rem; }
  .footer-links { gap: .85rem; }

  /* Larger tap targets for filter pills/buttons */
  .btn { min-height: 38px; }
}

@media (max-width: 420px) {
  .stats-row { grid-template-columns: 1fr 1fr; row-gap: .4rem !important; }
  .stat-value { font-size: 1.15rem; }
  .filters-bar { grid-template-columns: 1fr; }
  .filter-group[style*="flex:1"] { grid-column: auto; }
}

/* ── Admin Health Panel ────────────────────────────── */
.ap-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 900;
}
.ap-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(1180px, 95vw);
  background: #0d1117;
  border-left: 1px solid rgba(255,255,255,0.07);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.35);
}
.ap-panel.open { transform: translateX(0); }

.ap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  gap: 1rem;
}
.ap-title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.ap-header-right {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.ap-chip {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: .22rem .65rem;
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
}
.ap-chip .ap-dot { width: 7px; height: 7px; border-radius: 50%; }
.ap-chip.ok  .ap-dot { background: #22c55e; }
.ap-chip.ok  { color: #86efac; }
.ap-chip.warn .ap-dot { background: #f59e0b; }
.ap-chip.warn { color: #fcd34d; }
.ap-chip.err .ap-dot { background: #ef4444; }
.ap-chip.err { color: #fca5a5; }
.ap-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  padding: .3rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.ap-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.ap-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
  cursor: pointer;
  padding: .25rem .45rem;
  border-radius: 6px;
  line-height: 1;
  transition: color .12s, background .12s;
}
.ap-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

.ap-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}
.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
  color: #e2e8f0;
}
.ap-table thead th {
  position: sticky;
  top: 0;
  background: #141d2c;
  padding: .6rem .9rem;
  text-align: left;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  white-space: nowrap;
  z-index: 1;
}
.ap-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background .08s;
}
.ap-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.ap-table tbody tr.ap-never td { opacity: .45; }
.ap-table td {
  padding: .55rem .9rem;
  vertical-align: middle;
}
.ap-state-name { font-weight: 600; font-size: .85rem; color: #f1f5f9; }
.ap-state-code { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: rgba(255,255,255,0.3); }
.ap-never .ap-state-code { color: #ef4444; }

.ap-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 5px;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ap-badge.ok    { background: rgba(34,197,94,.15); color: #86efac; }
.ap-badge.warn  { background: rgba(245,158,11,.15); color: #fcd34d; }
.ap-badge.error { background: rgba(239,68,68,.15); color: #fca5a5; }
.ap-badge.none  { background: rgba(255,255,255,.07); color: rgba(255,255,255,.35); }
.ap-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.ap-bar-wrap { display: flex; align-items: center; gap: .45rem; min-width: 80px; }
.ap-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden; }
.ap-bar-fill { height: 100%; border-radius: 2px; transition: width .3s; }
.ap-bar-wrap.g .ap-bar-fill { background: #22c55e; }
.ap-bar-wrap.y .ap-bar-fill { background: #f59e0b; }
.ap-bar-wrap.r .ap-bar-fill { background: #ef4444; }
.ap-bar-wrap.g .ap-pct { color: #86efac; }
.ap-bar-wrap.y .ap-pct { color: #fcd34d; }
.ap-bar-wrap.r .ap-pct { color: #fca5a5; }
.ap-pct { font-size: .72rem; font-weight: 600; white-space: nowrap; min-width: 30px; text-align: right; font-family: 'JetBrains Mono', monospace; }

.ap-muted { color: rgba(255,255,255,0.25); font-size: .75rem; }
.ap-time { font-size: .75rem; color: rgba(255,255,255,0.45); }
.ap-date { font-size: .65rem; color: rgba(255,255,255,0.2); }
.ap-games { font-family: 'JetBrains Mono', monospace; font-size: .82rem; font-weight: 600; }
.ap-games.zero { color: #fca5a5; }
.ap-fetched { font-size: .72rem; color: rgba(255,255,255,0.3); }
.ap-err { font-size: .68rem; color: #fca5a5; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.ap-ret-ok   { color: #86efac; font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 600; }
.ap-ret-stale { color: #fca5a5; font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 600; }
.ap-ret-none  { color: rgba(255,255,255,.2); font-size: .75rem; }
.ap-ret-count { color: rgba(255,255,255,.3); font-size: .68rem; }

.ap-loading { text-align: center; padding: 3rem; color: rgba(255,255,255,0.3); font-size: .9rem; }

/* Sidebar admin button */
#adminHealthBtn.sidebar-item { margin-top: .25rem; }

/* ── Account page ──────────────────────────────────────────────────────────── */
.account-page { display: flex; align-items: flex-start; justify-content: center; padding: 3rem 2rem; min-height: 60vh; }
.account-card {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem 2rem; min-width: 280px; max-width: 360px; width: 100%;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.account-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.account-avatar svg { width: 38px; height: 38px; }
.account-fields { display: flex; flex-direction: column; gap: .9rem; width: 100%; margin-top: .25rem; }
.account-field { display: flex; flex-direction: column; gap: .15rem; align-items: center; }
.account-field-label { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.account-field-value { font-size: .95rem; font-weight: 600; color: var(--text); text-align: center; word-break: break-all; }
.account-logout-btn {
  margin-top: .5rem; background: transparent; color: var(--text-muted);
  border-color: var(--border); font-size: .82rem;
}
.account-logout-btn:hover { color: var(--text); border-color: var(--text-muted); }

/* ── Settings page ─────────────────────────────────────────────────────────── */
.settings-page { max-width: 620px; padding: 2.5rem 2rem; }

.settings-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
}
.settings-header-icon {
  width: 48px; height: 48px;
  background: var(--orange-dim);
  border: 1.5px solid rgba(249,115,22,0.22);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-header-icon svg { width: 20px; height: 20px; stroke: var(--orange); }
.settings-header-title { font-size: 1.45rem; font-weight: 700; color: var(--text); margin: 0 0 .15rem; }
.settings-header-sub { font-size: .8rem; color: var(--text-muted); margin: 0; }

.settings-group { margin-bottom: 1.6rem; }
.settings-group-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .55rem;
  padding-left: .1rem;
}
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 1.25rem;
}
.settings-row + .settings-row { border-top: 1px solid var(--border); }
.settings-row-name { font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: .18rem; }
.settings-row-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.settings-select {
  flex-shrink: 0;
  min-width: 185px;
  padding: .45rem 2.2rem .45rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  font-family: inherit;
  font-weight: 500;
  background: #f8f9fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") no-repeat right .75rem center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.settings-select:hover { border-color: var(--orange); }
.settings-select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim); }

/* ── Admin Health Panel ────────────────────────────── */
.ap-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 900;
}
.ap-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(1180px, 95vw);
  background: #0d1117;
  border-left: 1px solid rgba(255,255,255,0.07);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.35);
}
.ap-panel.open { transform: translateX(0); }
.ap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  gap: 1rem;
}
.ap-title { font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: -.01em; white-space: nowrap; }
.ap-header-right { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ap-chip {
  display: flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: .22rem .65rem;
  font-size: .72rem; font-weight: 700; color: rgba(255,255,255,0.55);
}
.ap-chip .ap-dot { width: 7px; height: 7px; border-radius: 50%; }
.ap-chip.ok  .ap-dot { background: #22c55e; } .ap-chip.ok  { color: #86efac; }
.ap-chip.warn .ap-dot { background: #f59e0b; } .ap-chip.warn { color: #fcd34d; }
.ap-chip.err .ap-dot { background: #ef4444; } .ap-chip.err { color: #fca5a5; }
.ap-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px; padding: .3rem .75rem;
  font-size: .75rem; font-weight: 600; color: rgba(255,255,255,0.6);
  cursor: pointer; white-space: nowrap; transition: background .12s, color .12s;
}
.ap-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.ap-close {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 1.1rem; cursor: pointer; padding: .25rem .45rem;
  border-radius: 6px; line-height: 1; transition: color .12s, background .12s;
}
.ap-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.ap-body { flex: 1; overflow-y: auto; overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .8rem; color: #e2e8f0; }
.ap-table thead th {
  position: sticky; top: 0; background: #141d2c;
  padding: .6rem .9rem; text-align: left;
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.07); white-space: nowrap; z-index: 1;
}
.ap-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background .08s; }
.ap-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.ap-table tbody tr.ap-never td { opacity: .45; }
.ap-table td { padding: .55rem .9rem; vertical-align: middle; }
.ap-state-name { font-weight: 600; font-size: .85rem; color: #f1f5f9; }
.ap-state-code { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: rgba(255,255,255,0.3); }
.ap-never .ap-state-code { color: #ef4444; }
.ap-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: 5px;
  font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.ap-badge.ok    { background: rgba(34,197,94,.15); color: #86efac; }
.ap-badge.warn  { background: rgba(245,158,11,.15); color: #fcd34d; }
.ap-badge.error { background: rgba(239,68,68,.15); color: #fca5a5; }
.ap-badge.none  { background: rgba(255,255,255,.07); color: rgba(255,255,255,.35); }
.ap-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ap-bar-wrap { display: flex; align-items: center; gap: .45rem; min-width: 80px; }
.ap-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden; }
.ap-bar-fill { height: 100%; border-radius: 2px; }
.ap-bar-wrap.g .ap-bar-fill { background: #22c55e; } .ap-bar-wrap.g .ap-pct { color: #86efac; }
.ap-bar-wrap.y .ap-bar-fill { background: #f59e0b; } .ap-bar-wrap.y .ap-pct { color: #fcd34d; }
.ap-bar-wrap.r .ap-bar-fill { background: #ef4444; } .ap-bar-wrap.r .ap-pct { color: #fca5a5; }
.ap-pct { font-size: .72rem; font-weight: 600; white-space: nowrap; min-width: 30px; text-align: right; font-family: 'JetBrains Mono', monospace; }
.ap-muted { color: rgba(255,255,255,0.25); font-size: .75rem; }
.ap-time { font-size: .75rem; color: rgba(255,255,255,0.45); }
.ap-date { font-size: .65rem; color: rgba(255,255,255,0.2); }
.ap-games { font-family: 'JetBrains Mono', monospace; font-size: .82rem; font-weight: 600; }
.ap-games.zero { color: #fca5a5; }
.ap-fetched { font-size: .72rem; color: rgba(255,255,255,0.3); }
.ap-err { font-size: .68rem; color: #fca5a5; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.ap-ret-ok    { color: #86efac; font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 600; }
.ap-ret-stale { color: #fca5a5; font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 600; }
.ap-ret-none  { color: rgba(255,255,255,.2); font-size: .75rem; }
.ap-ret-count { color: rgba(255,255,255,.3); font-size: .68rem; }
.ap-loading { text-align: center; padding: 3rem; color: rgba(255,255,255,0.3); font-size: .9rem; }

/* ── Health tab (full content area, dark) ─────────── */
.health-tab-wrap {
  background: #0d1117;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.health-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.health-tab-title { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.health-tab-sub { font-size: .72rem; color: rgba(255,255,255,0.3); margin-top: .15rem; }
.health-tab-chips { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.health-tab-body { flex: 1; overflow-x: auto; }

/* Inventory map cluster bubbles — green for "inventory marked", grey otherwise. */
.sf-cluster {
  background-clip: padding-box;
  border-radius: 20px;
}
.sf-cluster div {
  width: 30px;
  height: 30px;
  margin-left: 5px;
  margin-top: 5px;
  text-align: center;
  border-radius: 15px;
  font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
  color: #fff;
}
.sf-cluster span { line-height: 30px; font-weight: 600; }
.sf-cluster-instock { background-color: rgba(0, 204, 68, 0.35); }
.sf-cluster-outofstock { background-color: rgba(204, 34, 0, 0.35); }
.sf-cluster-neutral { background-color: rgba(74, 158, 255, 0.28); }
.sf-cluster-mixed { background-color: rgba(204, 34, 0, 0.18); }
.sf-cluster-mixed-in { background-color: rgba(0, 204, 68, 0.30); }
.sf-cluster-split { font-size: 0.82rem; letter-spacing: -0.5px; }

/* ── Store profile owner-info card (consumer-side, fetched async) ─────────── */
.store-owner-card {
  background: linear-gradient(180deg, #fafbff 0%, var(--card) 60%);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.store-fresh-banner {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem 1rem;
  background: linear-gradient(90deg, #14b8a6 0%, #0ea5e9 100%);
  color: #fff; font-size: .85rem; font-weight: 600;
}
.store-fresh-banner-tag {
  font-size: .62rem; font-weight: 800; letter-spacing: .12em;
  padding: .12rem .45rem; border-radius: 4px;
  background: rgba(255,255,255,0.22); color: #fff;
}
.store-owner-card-hd {
  display: flex; gap: .85rem; padding: .85rem 1rem;
  align-items: flex-start;
}
.store-owner-photo {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border);
}
.store-owner-card-body { flex: 1; min-width: 0; }
.store-owner-card-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: .25rem; display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap;
}
.store-verified-pill {
  font-size: .64rem; font-weight: 700; letter-spacing: .04em;
  padding: .12rem .45rem; border-radius: 10px;
  background: rgba(20,184,166,0.12); color: #0d9488;
  text-transform: none;
}
.store-owner-desc {
  font-size: .86rem; color: var(--text); line-height: 1.45;
  margin-bottom: .4rem;
}
.store-owner-meta {
  display: flex; gap: .85rem; flex-wrap: wrap;
  font-size: .77rem; color: var(--text-muted);
}
.store-owner-meta a { color: var(--mint); text-decoration: none; }
.store-owner-meta a:hover { text-decoration: underline; }
.store-owner-posts {
  padding: .6rem 1rem .85rem;
  border-top: 1px dashed var(--border);
}
.store-owner-posts-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: .45rem;
}
.store-owner-post {
  padding: .45rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.store-owner-post:last-child { border-bottom: none; padding-bottom: 0; }
.store-owner-post-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.store-owner-post-body { font-size: .8rem; color: var(--text-muted); margin-top: .1rem; white-space: pre-wrap; }
.store-owner-post-meta { font-size: .7rem; color: var(--text-muted); margin-top: .2rem; }

.store-full-page-row {
  padding: .55rem 1rem .8rem;
  border-top: 1px dashed var(--border);
}
.store-full-page-link {
  font-size: .8rem; font-weight: 700; color: var(--mint, #14b8a6);
  text-decoration: none;
}
.store-full-page-link:hover { text-decoration: underline; }

/* Retailer name in tables — clickable through to /store/<id>. The row
   itself still toggles the inline preview; the link's onclick stops
   propagation so clicking the name navigates instead of expanding. */
.store-name-link {
  color: inherit; text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color .12s, border-color .12s;
}
.store-name-link:hover {
  color: var(--mint, #14b8a6);
  border-bottom-color: currentColor;
}

/* ── "Claim this store" CTA at the bottom of the profile panel ─────────────── */
.store-claim-cta {
  display: flex; align-items: center; gap: .85rem;
  padding: .8rem 1rem;
  border-top: 1px dashed var(--border);
  background: #f8fafc;
  flex-wrap: wrap;
}
.store-claim-cta-icon {
  font-size: 1.4rem; line-height: 1; flex-shrink: 0;
}
.store-claim-cta-body { flex: 1; min-width: 180px; }
.store-claim-cta-title { font-size: .82rem; font-weight: 700; color: var(--text); }
.store-claim-cta-sub { font-size: .74rem; color: var(--text-muted); margin-top: .1rem; line-height: 1.35; }
.btn-claim {
  text-decoration: none;
  padding: .42rem .95rem;
  border-radius: 20px;
  background: var(--mint, #14b8a6); color: #fff;
  font-size: .78rem; font-weight: 700;
  white-space: nowrap;
  border: none; cursor: pointer;
  transition: opacity .15s;
}
.btn-claim:hover { opacity: .88; }

/* ── Paywall modal ─────────────────────────────────────────────────────────
   Bold, two-tone, no SaaS-template vibes. Chrome-dark header band, light
   card body, single accent color (orange). The yearly plan is selected by
   default with a discount badge — mimics how Apple positions the annual SKU. */
.paywall-modal {
  max-width: 480px;
  padding: 0;
  overflow: hidden;
}
.paywall-head {
  background: linear-gradient(180deg, var(--chrome) 0%, var(--chrome2) 100%);
  color: #fff;
  padding: 1.5rem 1.6rem 1.35rem;
  border-bottom: 1px solid var(--chrome-border);
}
.paywall-eyebrow {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--orange);
  margin-bottom: .55rem;
}
.paywall-h {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0 0 .55rem;
}
.paywall-sub {
  font-size: .82rem;
  line-height: 1.45;
  color: var(--chrome-text);
  margin: 0;
}
.paywall-bullets {
  list-style: none;
  padding: 1.05rem 1.6rem .35rem;
  margin: 0;
}
.paywall-bullets li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .82rem;
  color: var(--text);
  line-height: 1.45;
  padding: .22rem 0;
}
.paywall-bullets li span {
  color: var(--orange);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.paywall-bullets strong { font-weight: 700; color: var(--text); }
.paywall-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  padding: 1rem 1.6rem .25rem;
}
.paywall-plans-single { grid-template-columns: 1fr; }
.paywall-plan {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: .85rem .7rem .8rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .12s, background .15s;
  font-family: inherit;
}
.paywall-plan:hover { border-color: #c7cfdc; }
.paywall-plan-active {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3px var(--orange-dim);
}
.paywall-plan-name {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.paywall-plan-active .paywall-plan-name { color: var(--orange-dark); }
.paywall-plan-price {
  display: flex;
  align-items: baseline;
  gap: .12rem;
  color: var(--text);
}
.paywall-plan-price span {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
.paywall-plan-price em {
  font-style: normal;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.paywall-plan-foot {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: .35rem;
  line-height: 1.35;
}
.paywall-plan-badge {
  position: absolute;
  top: -9px;
  right: 10px;
  background: var(--orange);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: .18rem .4rem;
  border-radius: 6px;
}
.paywall-cta {
  display: block;
  width: calc(100% - 3.2rem);
  margin: 1rem 1.6rem 0;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: .85rem 1rem;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.paywall-cta:hover { background: var(--orange-dark); }
.paywall-cta:active { transform: scale(.985); }
.paywall-cta[disabled] { opacity: .55; cursor: not-allowed; }
.paywall-divider {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 1.1rem 1.6rem .45rem;
  color: var(--text-dim);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.paywall-divider::before,
.paywall-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.paywall-beta {
  padding: 0 1.6rem;
}
.paywall-beta-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  padding: .25rem 0;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
.paywall-beta-toggle:hover { color: var(--text); text-decoration-color: var(--text-muted); }
.paywall-beta-form {
  display: flex;
  gap: .4rem;
  margin-top: .55rem;
}
.paywall-beta-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .7rem;
  font-size: .82rem;
  font-family: inherit;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #fff;
  color: var(--text);
}
.paywall-beta-form input:focus { outline: none; border-color: var(--orange); }
.paywall-beta-form .btn {
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .8rem;
  font-weight: 700;
}
.paywall-foot {
  padding: 1rem 1.6rem 1.3rem;
  font-size: .68rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}

/* Account-tab Pro section */
.account-pro-card {
  margin-top: 1rem;
  padding: .95rem 1rem;
  background: linear-gradient(135deg, var(--orange-dim), transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.account-pro-status {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .45rem;
}
.account-pro-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.account-pro-status-dot.is-pro { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.account-pro-meta {
  font-size: .73rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.account-pro-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.account-pro-actions .btn {
  flex: 1;
  min-width: 110px;
  font-size: .78rem;
  padding: .5rem .8rem;
  border-radius: 8px;
}
.btn-pro-primary {
  background: var(--orange);
  color: #fff;
  border: none;
  font-weight: 700;
}
.btn-pro-primary:hover { background: var(--orange-dark); }

.strategy-controls {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 1.5rem .85rem;
  padding: .9rem 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}
.strat-ctrl-left { min-width: 220px; max-width: 560px; flex: 1 1 320px; }
.strat-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 .15rem; letter-spacing: -.01em; }
.strat-sub { font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.45; }
.strat-ctrl-right { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.strat-ctrl-right .filter-group { min-width: 130px; }

.strategy-tiles-wrap { margin: .25rem 1.5rem 2rem; }
.strategy-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .85rem;
}
.strategy-tiles.strat-byprice-mode {
  display: block;
}
.strat-tile {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .95rem 1rem 1rem;
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column; gap: .55rem;
  overflow: hidden;
}
.strat-tile:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.07);
}
.strat-tile-rank {
  position: absolute; top: .55rem; right: .65rem;
  font-size: .68rem; font-weight: 800;
  color: var(--text-dim);
  letter-spacing: .04em;
}
.strat-tile-rank.top-three { color: var(--orange); }
.strat-tile-head {
  display: flex; align-items: center; gap: .5rem;
  padding-right: 2rem;
}
.strat-tile-head .state-pill { font-size: .62rem; padding: .15rem .4rem; }
.strat-tile-head .price-pill { font-size: .72rem; padding: .12rem .45rem; }
.strat-tile-img {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 110px;
  overflow: hidden;
  margin: .15rem 0 .1rem;
}
.strat-tile-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.strat-tile-name {
  font-size: .95rem; font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.strat-tile-hero {
  display: flex; align-items: baseline; gap: .35rem;
  padding: .55rem 0 .15rem;
  border-bottom: 1px dashed var(--border);
}
.strat-tile-hero-val {
  font-size: 1.55rem; font-weight: 900;
  letter-spacing: -.02em;
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
}
.strat-tile-hero-lbl {
  font-size: .68rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.strat-tile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .85rem;
  font-size: .76rem;
}
.strat-tile-meta-row { display: flex; justify-content: space-between; gap: .35rem; }
.strat-tile-meta-row .lbl { color: var(--text-muted); }
.strat-tile-meta-row .val { color: var(--text); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.strat-tile-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .65rem; font-weight: 800;
  padding: .15rem .4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.strat-tile-badge.green { background: var(--green-dim); color: var(--green); }
.strat-tile-badge.orange { background: var(--orange-dim); color: var(--orange); }
.strat-tile-badge.teal { background: rgba(20, 184, 166, .14); color: #0f766e; }
.strat-tile-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
}

.strat-price-section { margin-bottom: 1.5rem; }
.strat-price-header {
  display: flex; align-items: baseline; gap: .65rem;
  margin: 0 0 .65rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--text);
}
.strat-price-tag {
  font-size: 1.4rem; font-weight: 900;
  letter-spacing: -.02em;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}
.strat-price-sub {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .strategy-tiles { grid-template-columns: 1fr; }
  .strategy-controls {
    flex-direction: column; align-items: stretch;
    gap: .7rem;
    margin: 0 .85rem .65rem;
    padding: .75rem .85rem;
  }
  /* Kill the flex:1 1 320px on strat-ctrl-left — in column-flex the 320px
     basis is read as VERTICAL size, leaving a huge empty gap before filters. */
  .strat-ctrl-left { flex: 0 0 auto; min-width: 0; max-width: 100%; }
  .strat-title { font-size: 1.05rem; }
  .strat-sub { font-size: .78rem; }
  .strat-ctrl-right { width: 100%; }
  .strategy-tiles-wrap { margin: .25rem .85rem 1.5rem; }
}
