:root {
  --bg: #f5f6fa;
  --bg-elevated: #ffffff;
  --border: #e3e5ee;
  --text: #1c1e2b;
  --text-muted: #6b6f85;
  --accent: #5b4de0;
  --accent-soft: #ecebfb;
  --positive: #0f9d78;
  --positive-soft: #e3f7f0;
  --negative: #d1425a;
  --warn: #c96a15;
  --warn-soft: #fbead9;
  --shadow: 0 1px 2px rgba(20, 22, 40, 0.04), 0 8px 24px rgba(20, 22, 40, 0.05);
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #14151f;
  --bg-elevated: #1c1e2b;
  --border: #2c2e3d;
  --text: #edeef5;
  --text-muted: #9296ab;
  --accent: #8b7bff;
  --accent-soft: #29254f;
  --positive: #35c99a;
  --positive-soft: #16332b;
  --negative: #ff6b81;
  --warn: #e8912f;
  --warn-soft: #3a2a15;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: background 0.2s ease, color 0.2s ease;
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 28px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 6px 0 20px;
}

.view-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.view-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 4px;
  margin-right: 20px;
  cursor: pointer;
}
.view-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.mlb-pitcher-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.mlb-pitcher-card h3 { margin: 0 0 4px; font-size: 16px; }
.mlb-pitcher-card .mlb-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.mlb-table-wrap { overflow-x: auto; }
.mlb-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.mlb-table th {
  text-align: right;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.mlb-table th:first-child, .mlb-table td:first-child { text-align: left; }
.mlb-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; font-family: 'JetBrains Mono', monospace; }
.mlb-table td:nth-child(2) { font-family: inherit; color: var(--text-muted); }
.mlb-player-grid { margin-top: 6px; }
.mlb-player-card { cursor: pointer; }
.mlb-tab-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.mlb-view-tab-group { margin-top: 8px; margin-bottom: 4px; }
.mlb-modal-body { margin-top: 14px; }
.mlb-col-highlight { background: var(--accent-soft); font-weight: 700; }
.prop-side-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 11px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 0.82em;
  white-space: nowrap;
  vertical-align: middle;
  color: white;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}
.prop-side-badge.side-over { background: var(--accent); }
.prop-side-badge.side-under { background: var(--warn); }

.recent-form-player {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.recent-form-player:first-of-type {
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
}
.recent-form-player h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.kbo-batter-gamelog { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.kbo-batter-gamelog-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.kbo-batter-gamelog-head h4 { margin: 0; }
.kbo-star-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.kbo-star-btn.active { color: #f5b400; }
.kbo-batter-gamelog:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.kbo-batter-gamelog h4 { margin: 0 0 8px; font-size: 14px; }
.kbo-row-empty td { color: var(--text-muted); font-style: italic; text-align: left; }
.mlb-row-empty td { color: var(--text-muted); font-style: italic; text-align: left; }
.mlb-recent-row { background: var(--bg-subtle, rgba(0,0,0,0.02)); }
.mlb-window-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-align: left !important; text-transform: uppercase; letter-spacing: 0.02em; }

.golf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.golf-row:last-child { border-bottom: none; }
.golf-rank { width: 26px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.golf-name { flex: 1; font-weight: 600; min-width: 120px; }
.golf-total { width: 48px; text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.golf-rounds { display: flex; gap: 4px; flex-wrap: wrap; }
.golf-round-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.golf-round-score.under-par {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
  font-weight: 700;
}
.golf-hist-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #35c99a);
  color: white;
  font-weight: 800;
  border-radius: 10px;
  font-size: 17px;
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }

.search-wrap {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon { position: absolute; left: 12px; color: var(--text-muted); pointer-events: none; }
#search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
#search-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.chip-btn, .icon-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chip-btn:hover, .icon-btn:hover { border-color: var(--accent); }
.chip-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.icon-btn { padding: 9px; }

.count-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 6px; letter-spacing: -0.01em; }
.stat-value.positive { color: var(--positive); }

.status-banner {
  background: var(--positive-soft);
  color: var(--positive);
  border: 1px solid var(--positive);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.controls-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.category-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.category-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.category-chip.active { background: var(--accent); border-color: var(--accent); color: white; }

.sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.sort-wrap select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.sort-wrap select:hover { border-color: var(--accent); }
.sort-wrap select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}

.item-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item-card:hover { transform: translateY(-2px); border-color: var(--accent); }

.mini-form-slot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  background: var(--bg-subtle, rgba(0,0,0,0.02));
  border-radius: 8px;
}
.mini-form-slot.mini-form-loading { color: var(--text-muted); font-size: 11.5px; padding: 8px; }
.mini-form-row { display: flex; align-items: center; gap: 4px; }
.mini-form-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 26px;
  flex-shrink: 0;
}
.mini-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); display: inline-block; flex-shrink: 0; }
.mini-dot.hit { background: var(--positive); }
.mini-dot.miss { background: var(--negative); }
.mini-form-rate {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.mini-form-empty { font-size: 10.5px; color: var(--text-muted); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.outlier-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--positive);
  background: var(--positive-soft);
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.star-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  line-height: 0;
}
.star-btn.active { color: #f5a623; }
.star-btn svg { display: block; }

.item-name { font-weight: 700; font-size: 15px; line-height: 1.3; padding-right: 26px; }

.rating-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.coverage-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  cursor: help;
}

.movement-row { font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; min-height: 16px; }

.price-row { display: flex; align-items: baseline; gap: 8px; }
.best-price { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-family: 'JetBrains Mono', monospace; }
.market-price { font-size: 13px; color: var(--text-muted); text-decoration: line-through; font-family: 'JetBrains Mono', monospace; }
.savings-pct { font-size: 12.5px; font-weight: 700; color: var(--positive); margin-left: auto; }

.vendor-row { font-size: 12.5px; color: var(--text-muted); display: flex; justify-content: space-between; }
.vendor-row .vendor-name { font-weight: 600; color: var(--text); }

.empty-state { text-align: center; color: var(--text-muted); padding: 60px 0; font-size: 14px; }

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 56px 20px;
  color: var(--accent);
  grid-column: 1 / -1;
}
.loading-v {
  width: 90px;
  height: 90px;
  overflow: visible;
  animation: loading-v-pulse 1.6s ease-in-out 0.6s infinite;
}
/* Same trace-in-then-fill reveal as the splash's V (see .splash-v-path /
   .splash-v-fill), just quicker (~0.65s total vs. ~1.6s) since this icon
   reappears constantly during normal use -- every league switch, every
   card click -- rather than once per session. */
.loading-v-trace {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 165;
  stroke-dashoffset: 165;
  animation: loading-v-draw-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes loading-v-draw-in { to { stroke-dashoffset: 0; } }
.loading-v-fill {
  opacity: 0;
  animation: loading-v-fill-in 0.3s ease-out 0.35s forwards;
}
@keyframes loading-v-fill-in { to { opacity: 1; } }
@keyframes loading-v-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(91, 77, 224, 0.35)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 12px rgba(91, 77, 224, 0.55)); }
}
.loading-v-shimmer {
  opacity: 0;
  animation: loading-v-shimmer-reveal 0.01s linear 0.6s forwards, loading-v-sweep 1.8s ease-in-out 0.6s infinite;
}
@keyframes loading-v-shimmer-reveal { to { opacity: 1; } }
@keyframes loading-v-sweep {
  0% { transform: translateX(-20px) skewX(-18deg); }
  50%, 100% { transform: translateX(150px) skewX(-18deg); }
}
.loading-overlay-text {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* Full-screen splash shown once on initial page load, dismissed by app.js
   once the first Markets fetch resolves. Dark background regardless of
   the user's saved theme -- this is a one-time brand moment, not part of
   the themed UI underneath it -- with the same V-gradient (purple->teal)
   as the topbar's brand mark, just animated: the outline traces itself
   in, fills in, then a diagonal light sweeps across it on a loop
   (the "Netflix logo flash" effect) while the wordmark letters cascade in
   underneath and a thin progress sliver loops beneath that. */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0b14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.app-splash.app-splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 77, 224, 0.35), rgba(53, 201, 154, 0.12) 45%, transparent 70%);
  filter: blur(10px);
  animation: splash-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes splash-glow-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
}
.splash-v-stage {
  position: relative;
  width: 170px;
  height: 170px;
  animation: splash-v-breathe 2.4s ease-in-out infinite;
}
@keyframes splash-v-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
.splash-v-stage svg { width: 100%; height: 100%; overflow: visible; display: block; }
.splash-v-path {
  fill: none;
  stroke: url(#splashVGrad);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: splash-draw-in 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards, splash-glow-line 2.4s ease-in-out 1.1s infinite;
}
@keyframes splash-draw-in { to { stroke-dashoffset: 0; } }
@keyframes splash-glow-line {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(139, 123, 255, 0.5)); }
  50% { filter: drop-shadow(0 0 16px rgba(139, 123, 255, 0.85)); }
}
.splash-v-fill {
  opacity: 0;
  animation: splash-fill-in 0.6s ease-out 1s forwards;
}
@keyframes splash-fill-in { to { opacity: 1; } }
.splash-shimmer-bar { animation: splash-sweep 2.6s ease-in-out 1.4s infinite; }
@keyframes splash-sweep {
  0% { transform: translateX(-140px) skewX(-18deg); }
  35%, 100% { transform: translateX(260px) skewX(-18deg); }
}
.splash-wordmark {
  display: flex;
  gap: 3px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #edeef5;
}
.splash-wordmark span {
  opacity: 0;
  animation: splash-letter-in 0.4s ease-out forwards;
}
.splash-wordmark span:nth-child(1) { animation-delay: 1.15s; }
.splash-wordmark span:nth-child(2) { animation-delay: 1.22s; }
.splash-wordmark span:nth-child(3) { animation-delay: 1.29s; }
.splash-wordmark span:nth-child(4) { animation-delay: 1.36s; }
.splash-wordmark span:nth-child(5) { animation-delay: 1.43s; }
.splash-wordmark span:nth-child(6) { animation-delay: 1.5s; }
.splash-wordmark span:nth-child(7) { animation-delay: 1.57s; }
@keyframes splash-letter-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.splash-progress-track {
  width: 150px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  animation: splash-fade-in 0.5s ease-out 1.8s forwards;
}
.splash-progress-fill {
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: linear-gradient(90deg, #5b4de0, #35c99a);
  animation: splash-progress-slide 1.4s ease-in-out infinite;
}
@keyframes splash-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
.splash-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #6b6f85;
  opacity: 0;
  animation: splash-fade-in 0.5s ease-out 1.8s forwards;
}
@keyframes splash-fade-in { to { opacity: 1; } }

.app-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--bg-elevated);
  border-radius: 18px;
  max-width: 560px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal h2 { margin: 0 0 4px; font-size: 20px; }
.modal .card-category { display: inline-block; margin-bottom: 10px; }

.vendor-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
.vendor-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.vendor-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
.vendor-table tr:last-child td { border-bottom: none; }
.vendor-table .best-row { background: var(--positive-soft); }
.vendor-table .offline-row { opacity: 0.55; }
.vendor-table .offline-line { color: var(--negative); font-weight: 700; }
.vendor-table .price-cell { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.stock-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.stock-tag.in { color: var(--positive); background: var(--positive-soft); }
.stock-tag.out { color: var(--negative); background: rgba(209, 66, 90, 0.12); }

.recent-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.recent-form h3 { margin: 0 0 10px; font-size: 14px; }
.form-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.form-label { width: 78px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.form-dots { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.form-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: inline-block; }
.form-dot.hit { background: var(--positive); }
.form-dot.miss { background: var(--negative); }
.form-rate { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; width: 36px; text-align: right; flex-shrink: 0; }
.novig-row { font-size: 13px; color: var(--text); margin-top: 6px; }
.novig-row strong { font-family: 'JetBrains Mono', monospace; }
.novig-row .form-note { display: inline; }

.form-empty, .form-note, .form-more { font-size: 12px; color: var(--text-muted); }
.form-more { align-self: center; }
.form-note { margin: 10px 0 0; }

.prop-chart-header { margin-bottom: 10px; }
.prop-chart-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.prop-chart-window { font-size: 13px; font-weight: 700; color: var(--text); }
.prop-chart-hitrate { font-size: 20px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.prop-chart-hitrate.good { color: var(--positive); }
.prop-chart-hitrate.bad { color: var(--negative); }
.prop-chart-hitrate-detail { font-size: 12px; color: var(--text-muted); }
.prop-quickstat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 6px 14px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.prop-quickstat { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.prop-quickstat-label { color: var(--text-muted); font-weight: 600; }
.prop-quickstat-value { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.prop-quickstat-value.good { color: var(--positive); }
.prop-quickstat-value.bad { color: var(--negative); }
.prop-chart-avgmed { font-size: 12.5px; color: var(--text-muted); margin: 10px 0; }
.prop-chart-avgmed strong { color: var(--text); font-family: 'JetBrains Mono', monospace; }
.prop-chart-wrap { position: relative; }
.prop-chart-svg { width: 100%; height: 200px; display: block; overflow: hidden; }
.prop-bar { fill: var(--border); }
.prop-bar.hit { fill: var(--positive); }
.prop-bar.miss { fill: var(--negative); }
.prop-bar-group { cursor: pointer; }
.prop-bar-value { font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace; fill: var(--text-muted); }
.prop-bar-value.hit { fill: var(--positive); }
.prop-bar-value.miss { fill: var(--negative); }
.prop-line-marker { stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.prop-zero-marker { stroke: var(--border); stroke-width: 1; }
.prop-chart-xaxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.prop-chart-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  box-shadow: var(--shadow);
}
.prop-tooltip-date { font-weight: 700; margin-bottom: 3px; }
.prop-tooltip-score { opacity: 0.85; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.prop-tooltip-stat { display: flex; justify-content: space-between; gap: 10px; }
.prop-tooltip-stat strong { font-family: 'JetBrains Mono', monospace; }

.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-secondary { background: var(--bg-elevated); color: var(--text); }

.hr-range-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0 6px;
}
.hr-range-row strong { color: var(--text); font-family: 'JetBrains Mono', monospace; }
.hr-histogram {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 56px;
  padding: 0 2px;
}
.hr-hist-bar {
  flex: 1;
  background: var(--border);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}
.hr-hist-bar.in-range { background: var(--accent); }
.hr-slider-wrap {
  position: relative;
  height: 28px;
  margin-top: 2px;
}
.hr-slider-wrap input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
}
.hr-slider-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.hr-slider-wrap input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  box-shadow: var(--shadow);
  margin-top: -6px;
  cursor: pointer;
}
.hr-slider-wrap input[type="range"]::-moz-range-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.hr-slider-wrap input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  box-shadow: var(--shadow);
  cursor: pointer;
}
#hit-rate-filter-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .app-shell { padding: 16px 16px 40px; }
  .topbar { flex-wrap: wrap; }
  .search-wrap { order: 3; max-width: none; width: 100%; }
}
