/* ═══ PLAYER STATS VIEW (scoped) ═══ */
#statsView {
  --st-pink: var(--accent-pink);
  --st-purple: var(--accent-purple);
  --st-mint: var(--accent-mint);
  --st-gold: var(--accent-gold);
  --st-orange: var(--accent-orange);
  --st-felt: var(--felt);
  --st-card: var(--card-white);
  --st-red: var(--card-red);
  --st-shadow: 6px 6px 0 var(--ink);
  --st-shadow-sm: 3px 3px 0 var(--ink);
  --st-r: 14px;
}

#statsView .stats-hero {
  background: var(--ink);
  color: var(--bg);
  padding: 44px 40px 52px;
  position: relative;
  overflow: hidden;
}
#statsView .stats-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 40%, rgba(255, 94, 138, 0.12), transparent 40%),
    radial-gradient(circle at 90% 60%, rgba(124, 92, 252, 0.12), transparent 40%),
    radial-gradient(circle at 50% 20%, rgba(0, 210, 168, 0.08), transparent 30%);
  pointer-events: none;
}
#statsView .stats-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
#statsView .stats-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
#statsView .stats-hero-btn {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
}
#statsView .stats-hero-btn:hover {
  background: var(--bg);
  color: var(--ink);
}
#statsView .stats-hero-top {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
#statsView .stats-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--st-pink), var(--st-purple));
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  flex-shrink: 0;
}
#statsView .stats-hero-info h1 {
  font-family: "Bowlby One SC", sans-serif;
  font-size: 2.2rem;
  letter-spacing: -0.5px;
  line-height: 1;
}
#statsView .stats-hero-info .sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  opacity: 0.45;
  margin-top: 3px;
}
#statsView .stats-hero-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
#statsView .stats-hb {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
#statsView .stats-hb.gold {
  background: rgba(255, 182, 39, 0.2);
  color: var(--st-gold);
}
#statsView .stats-hb.mint {
  background: rgba(0, 210, 168, 0.15);
  color: var(--st-mint);
}
#statsView .stats-hb.pink {
  background: rgba(255, 94, 138, 0.15);
  color: var(--st-pink);
}
#statsView .stats-hb.purple {
  background: rgba(124, 92, 252, 0.15);
  color: #b4a0ff;
}

#statsView .stats-big-nums {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--st-r);
  overflow: hidden;
  margin-top: 4px;
}
#statsView .stats-bn {
  text-align: center;
  padding: 22px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}
#statsView .stats-bn:last-child {
  border-right: none;
}
#statsView .stats-bn-val {
  font-family: "Bowlby One SC", sans-serif;
  font-size: 2.4rem;
  line-height: 1;
}
#statsView .stats-bn-val.gold {
  color: var(--st-gold);
}
#statsView .stats-bn-val.mint {
  color: var(--st-mint);
}
#statsView .stats-bn-val.pink {
  color: var(--st-pink);
}
#statsView .stats-bn-val.purple {
  color: #b4a0ff;
}
#statsView .stats-bn-val.orange {
  color: var(--st-orange);
}
#statsView .stats-bn-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.4;
  margin-top: 4px;
}

#statsView .stats-page-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 40px 60px;
}
#statsView .stats-section-title {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#statsView .stats-section-title .ico {
  font-size: 1.4rem;
}

#statsView .stats-stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
#statsView .stats-sc {
  background: var(--st-card);
  border: 3px solid var(--ink);
  border-radius: var(--st-r);
  padding: 22px 20px;
  box-shadow: var(--st-shadow-sm);
  transition: transform 0.25s;
}
#statsView .stats-sc:hover {
  transform: translateY(-4px);
}
#statsView .stats-sc-val {
  font-family: "Bowlby One SC", sans-serif;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}
#statsView .stats-sc-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.45;
}
#statsView .stats-sc-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  margin-top: 8px;
  opacity: 0.55;
  line-height: 1.4;
}

#statsView .stats-two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  margin-bottom: 40px;
  align-items: start;
}

#statsView .stats-chart-box {
  background: var(--st-card);
  border: 3px solid var(--ink);
  border-radius: var(--st-r);
  padding: 28px 24px;
  box-shadow: var(--st-shadow-sm);
}
#statsView .stats-chart-box h3 {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
#statsView .stats-chart-bar {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 160px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}
#statsView .stats-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  position: relative;
  min-width: 0;
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
#statsView .stats-bar-lbl {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.5rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.45;
}
#statsView .stats-bar-v {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  font-weight: 700;
}

#statsView .stats-pos-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
#statsView .stats-pos-table th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: left;
  padding: 10px 12px;
  opacity: 0.45;
  border-bottom: 2px solid var(--ink);
}
#statsView .stats-pos-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(26, 14, 62, 0.08);
  font-size: 0.9rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}
#statsView .stats-pos-table tr:hover td {
  background: rgba(124, 92, 252, 0.04);
}
#statsView .stats-pos-name {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1rem;
}
#statsView .stats-pos-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(26, 14, 62, 0.08);
  overflow: hidden;
  min-width: 80px;
}
#statsView .stats-pos-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
#statsView .stats-pos-positive {
  color: var(--st-mint);
}
#statsView .stats-pos-negative {
  color: var(--st-pink);
}

#statsView .stats-street-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
#statsView .stats-street-card {
  background: var(--st-card);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--st-shadow-sm);
  transition: transform 0.2s;
}
#statsView .stats-street-card:hover {
  transform: translateY(-3px);
}
#statsView .stats-street-name {
  font-family: "Bowlby One SC", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.5;
}
#statsView .stats-street-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 5px solid rgba(26, 14, 62, 0.1);
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
#statsView .stats-street-ring-val {
  font-family: "Bowlby One SC", sans-serif;
  font-size: 1.3rem;
}
#statsView .stats-street-detail {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 700;
  opacity: 0.45;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#statsView .stats-sc-purple { color: var(--accent-purple); }
#statsView .stats-sc-orange { color: var(--accent-orange); }
#statsView .stats-sc-mint { color: var(--accent-mint); }
#statsView .stats-sc-pink { color: var(--accent-pink); }
#statsView .stats-sc-gold { color: var(--accent-gold); }
#statsView .stats-empty {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--ink);
  opacity: 0.55;
  text-align: center;
  padding: 32px 16px;
  letter-spacing: 0.5px;
}
#statsView .stats-empty-cell {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  opacity: 0.55;
  padding: 28px 8px;
}
#statsView .stats-chart-box--mb-lg { margin-bottom: 40px; }
#statsView .stats-section-title--mt-lg { margin-top: 28px; }
#statsView .stats-spacer-sm { height: 20px; }
#statsView .stats-spacer-md { height: 24px; }

#statsView .stats-leak-section {
  margin-bottom: 40px;
}
#statsView .stats-leak-card {
  background: var(--st-card);
  border: 3px solid var(--ink);
  border-radius: var(--st-r);
  padding: 24px;
  box-shadow: var(--st-shadow-sm);
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: transform 0.2s;
}
#statsView .stats-leak-card:hover {
  transform: translateY(-3px);
}
#statsView .stats-leak-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
#statsView .stats-leak-icon.danger {
  background: rgba(255, 94, 138, 0.12);
  border: 2px solid var(--st-pink);
}
#statsView .stats-leak-icon.warning {
  background: rgba(255, 182, 39, 0.12);
  border: 2px solid var(--st-gold);
}
#statsView .stats-leak-icon.good {
  background: rgba(0, 210, 168, 0.12);
  border: 2px solid var(--st-mint);
}
#statsView .stats-leak-info h4 {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
#statsView .stats-leak-info p {
  font-size: 0.9rem;
  opacity: 0.65;
  line-height: 1.5;
}
#statsView .stats-leak-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 10px;
  margin-top: 8px;
}
#statsView .stats-leak-tag.danger {
  background: rgba(255, 94, 138, 0.12);
  color: var(--st-pink);
}
#statsView .stats-leak-tag.warning {
  background: rgba(255, 182, 39, 0.12);
  color: var(--st-gold);
}
#statsView .stats-leak-tag.good {
  background: rgba(0, 210, 168, 0.12);
  color: var(--st-mint);
}
#statsView .stats-coach-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  box-shadow: var(--st-shadow-sm);
  transition: all 0.2s;
  text-decoration: none;
}
#statsView .stats-coach-cta:hover {
  background: var(--st-purple);
  transform: translate(-1px, -1px);
  box-shadow: var(--st-shadow);
}

/* ── AI Coach coming-soon card ── */
#statsView .stats-coming-soon-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--ink), #2a1a5e);
  color: var(--bg);
  border: 3px solid var(--st-purple);
  border-radius: var(--st-r);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--st-shadow);
}

#statsView .stats-coming-soon-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.4));
}

#statsView .stats-coming-soon-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#statsView .stats-coming-soon-badge {
  display: inline-block;
  background: var(--st-gold);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

#statsView .stats-coming-soon-title {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--bg);
}

#statsView .stats-coming-soon-desc {
  font-size: 0.9rem;
  opacity: 0.65;
  max-width: 520px;
  margin: 0;
  line-height: 1.5;
}

/* ── (legacy upsell — kept for admin/other paths) ── */
#statsView .stats-upsell {
  background: linear-gradient(135deg, var(--ink), #2a1a5e);
  color: var(--bg);
  border: 3px solid var(--st-purple);
  border-radius: var(--st-r);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  box-shadow: var(--st-shadow);
}
#statsView .stats-upsell-text h3 {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
#statsView .stats-upsell-text h3 em {
  font-style: italic;
  color: var(--st-gold);
}
#statsView .stats-upsell-text p {
  font-size: 0.92rem;
  opacity: 0.7;
  max-width: 500px;
}
#statsView .stats-upsell-tiers {
  display: flex;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}
#statsView .stats-tier-btn {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
#statsView .stats-tier-btn:hover {
  border-color: var(--st-gold);
  background: rgba(255, 182, 39, 0.1);
}
#statsView .stats-tier-btn .price {
  font-family: "Bowlby One SC", sans-serif;
  font-size: 1.3rem;
  color: var(--st-gold);
}
#statsView .stats-tier-btn.pop {
  background: var(--st-gold);
  color: var(--ink);
  border-color: var(--st-gold);
}
#statsView .stats-tier-btn.pop:hover {
  background: #ffe070;
}

#statsView .stats-hh-section {
  margin-bottom: 40px;
}
#statsView .stats-hh-hint {
  font-size: 0.78rem;
  color: rgba(26, 14, 62, 0.55);
  margin: -8px 0 14px;
  max-width: 52rem;
  line-height: 1.45;
}
#statsView .stats-hh-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 3px solid var(--ink);
  border-radius: var(--st-r);
  overflow: visible;
}
#statsView .stats-hh-table th {
  background: var(--ink);
  color: var(--bg);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 14px;
  text-align: left;
}
#statsView .stats-hh-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(26, 14, 62, 0.08);
  font-size: 0.88rem;
}
#statsView .stats-hh-table tr:last-child td {
  border-bottom: none;
}
#statsView .stats-hh-table tr.stats-hh-row {
  cursor: pointer;
}
#statsView .stats-hh-table tr.stats-hh-row.stats-hh-expanded td {
  background: rgba(124, 92, 252, 0.08);
}
#statsView .stats-hh-table tr.stats-hh-row:hover td {
  background: rgba(124, 92, 252, 0.04);
}
#statsView .stats-hh-table tr:not(.stats-hh-detail):not(.stats-hh-row):hover td {
  background: rgba(124, 92, 252, 0.04);
}
#statsView .stats-vs-sep {
  display: inline-block;
  margin: 0 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.4;
  vertical-align: middle;
}
#statsView .stats-vs-opp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  opacity: 0.85;
}
#statsView .stats-vs-opp:last-child { margin-right: 0; }
#statsView .stats-vs-pos {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border: 1px solid rgba(26, 14, 62, 0.3);
  border-radius: 4px;
  color: var(--ink);
  opacity: 0.55;
}
#statsView .stats-hh-table tr.stats-hh-detail td.stats-hh-detail-cell {
  background: rgba(124, 92, 252, 0.06);
  border-bottom: 1px solid rgba(26, 14, 62, 0.08);
  padding: 14px 16px 18px;
  vertical-align: top;
  max-height: min(80vh, 960px);
  overflow-y: auto;
}
#statsView .stats-hh-detail-inner {
  font-size: 0.82rem;
  line-height: 1.45;
}
#statsView .stats-hh-detail-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: rgba(26, 14, 62, 0.75);
  margin-bottom: 12px;
}
#statsView .stats-hh-stack-card {
  background: var(--bg, #fff);
  border: 2px solid var(--ink);
  border-radius: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
}
#statsView .stats-hh-stack-head {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--st-purple, #7c5cfc);
  margin-bottom: 8px;
}
#statsView .stats-hh-stack-scroll {
  overflow-x: auto;
}
#statsView .stats-hh-stack-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 0.78rem;
}
#statsView .stats-hh-stack-table th,
#statsView .stats-hh-stack-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(26, 14, 62, 0.1);
  text-align: left;
  white-space: nowrap;
}
#statsView .stats-hh-stack-table th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(26, 14, 62, 0.55);
}
#statsView .stats-hh-stack-table tr:last-child td {
  border-bottom: 0;
}
#statsView .stats-hh-stack-bot {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid rgba(26, 14, 62, 0.2);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  color: rgba(26, 14, 62, 0.55);
  text-transform: uppercase;
}
#statsView .stats-hh-detail-shown {
  display: inline;
  white-space: normal;
}
#statsView .stats-hh-detail-shown .stats-hh-opp-cards,
#statsView .stats-hh-detail-shown .stats-mc {
  margin-left: 4px;
}
#statsView .stats-hh-detail-loading,
#statsView .stats-hh-detail-empty {
  font-size: 0.8rem;
  color: rgba(26, 14, 62, 0.6);
  margin: 0;
}
#statsView .stats-hh-street-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  #statsView .stats-hh-street-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
#statsView .stats-hh-street-card {
  background: var(--bg, #fff);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
}
#statsView .stats-hh-street-head {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--st-purple, #7c5cfc);
  margin-bottom: 6px;
}
#statsView .stats-hh-street-committed {
  font-size: 0.78rem;
  margin-bottom: 8px;
}
#statsView .stats-hh-street-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
#statsView .stats-hh-size-pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(26, 14, 62, 0.07);
  padding: 3px 8px;
  border-radius: 6px;
}
#statsView .stats-hh-size-none {
  font-size: 0.72rem;
  color: rgba(26, 14, 62, 0.45);
  font-style: italic;
}
#statsView .stats-hh-street-opp {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(26, 14, 62, 0.18);
}
#statsView .stats-hh-street-opp-head {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(26, 14, 62, 0.55);
  margin-bottom: 6px;
}
#statsView .stats-hh-street-opp-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#statsView .stats-hh-opp-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.72rem;
  line-height: 1.35;
}
#statsView .stats-hh-opp-tag {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.65rem;
  color: var(--st-purple, #7c5cfc);
  flex-shrink: 0;
}
#statsView .stats-hh-opp-phrase {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: rgba(26, 14, 62, 0.85);
}
#statsView .stats-hh-opp-cards {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
#statsView .stats-mc {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 38px;
  background: var(--st-card);
  border: 2px solid var(--ink);
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.58rem;
  line-height: 1;
  margin-right: 3px;
}
#statsView .stats-mc.red {
  color: var(--st-red);
}
#statsView .stats-mc.blk {
  color: var(--ink);
}
#statsView .stats-win {
  color: var(--st-mint);
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}
#statsView .stats-loss {
  color: var(--st-pink);
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}
#statsView .stats-ht-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(124, 92, 252, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--st-purple);
  display: inline-block;
}
#statsView .stats-pos-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  background: rgba(26, 14, 62, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
}

#statsView .stats-session-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}
#statsView .stats-sess-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  position: relative;
  min-width: 0;
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
#statsView .stats-sess-bar.up {
  background: var(--st-mint);
}
#statsView .stats-sess-bar.down {
  background: var(--st-pink);
}
#statsView .stats-sess-bar .s-lbl {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.45rem;
  font-weight: 700;
  opacity: 0.35;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #statsView .stats-hero {
    padding: 28px 20px 36px;
  }
  #statsView .stats-page-body {
    padding: 24px 16px 40px;
  }
  #statsView .stats-big-nums {
    grid-template-columns: repeat(3, 1fr);
  }
  #statsView .stats-big-nums .stats-bn:nth-child(4),
  #statsView .stats-big-nums .stats-bn:nth-child(5) {
    display: none;
  }
  #statsView .stats-stat-row {
    grid-template-columns: 1fr 1fr;
  }
  #statsView .stats-two-col {
    grid-template-columns: 1fr;
  }
  #statsView .stats-street-grid {
    grid-template-columns: 1fr 1fr;
  }
  #statsView .stats-upsell {
    flex-direction: column;
    align-items: flex-start;
  }
  #statsView .stats-upsell-tiers {
    margin-left: 0;
  }
}
@media (max-width: 560px) {
  #statsView .stats-stat-row {
    grid-template-columns: 1fr;
  }
  #statsView .stats-big-nums {
    grid-template-columns: repeat(2, 1fr);
  }
  #statsView .stats-street-grid {
    grid-template-columns: 1fr;
  }
  #statsView .stats-hh-table th:nth-child(5),
  #statsView .stats-hh-table td:nth-child(5) {
    display: none;
  }
}

#statsView .stats-hh-ai {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--st-card);
  cursor: pointer;
}
#statsView .stats-hh-ai:hover {
  background: var(--accent-mint);
}

#statsView .stats-coach-paywall {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--st-r);
  border: 2px dashed var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

#statsView .stats-coach-markdown {
  white-space: pre-wrap;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  padding: 16px;
  border-radius: var(--st-r);
  border: 2px solid var(--ink);
  background: var(--st-card);
  max-height: 420px;
  overflow: auto;
}

#statsView .stats-coach-progress {
  padding: 18px 18px 14px;
  border-radius: var(--st-r);
  border: 2px solid var(--ink);
  background: var(--st-card);
}
#statsView .stats-coach-progress-label {
  margin: 0 0 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
}
#statsView .stats-coach-progress-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--bg-alt);
  overflow: hidden;
}
#statsView .stats-coach-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-mint));
  transition: width 0.18s ease;
}
#statsView .stats-coach-progress-text {
  display: inline-block;
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink);
  opacity: 0.65;
}
#statsView .stats-coach-progress-spot {
  margin: 6px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent-purple);
}
#statsView .stats-coach-source-line {
  margin: 10px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink);
  opacity: 0.6;
  text-align: right;
}

#statsView .stats-coach-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

#statsView .stats-coach-usage {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  opacity: 0.85;
}

#statsView .stats-coach-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

#statsView .stats-snapshots-mount {
  margin-top: 16px;
}

#statsView .stats-snapshots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
#statsView .stats-snapshots-table th,
#statsView .stats-snapshots-table td {
  border: 2px solid var(--ink);
  padding: 6px 8px;
  text-align: left;
}

#statsView .stats-community-line {
  margin-top: 16px;
  font-size: 0.9rem;
}

.stats-coach-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.stats-coach-modal[hidden] {
  display: none;
}
.stats-coach-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 28, 0.55);
}
.stats-coach-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--st-card, #fff);
  border: 3px solid var(--ink);
  border-radius: var(--st-r, 16px);
  box-shadow: var(--st-shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.2));
}
.stats-coach-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--ink);
}
.stats-coach-modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.stats-coach-modal-close {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: #fff;
  cursor: pointer;
}
.stats-coach-modal-body {
  margin: 0;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}
