:root {
  --bg: #090610;
  --bg-2: #120b20;
  --panel: #171025;
  --panel-2: #201332;
  --ink: #f4efff;
  --muted: #b7a7cf;
  --line: #38264f;
  --cyan: #c7a6ff;
  --lime: #d8b4ff;
  --violet: #8d5cff;
  --red: #ff5a68;
  --gold: #f0c354;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 4%, rgba(199, 166, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(141, 92, 255, 0.18), transparent 30rem),
    linear-gradient(180deg, var(--bg), #10091a 55%, #090610);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

body.beta-locked {
  overflow: hidden;
}

body.beta-locked > :not(.beta-gate) {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.beta-gate {
  align-items: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(199, 166, 255, 0.2), transparent 22rem),
    linear-gradient(180deg, rgba(9, 6, 16, 0.96), rgba(18, 11, 32, 0.98));
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 80;
}

.beta-gate.hidden {
  display: none;
}

.beta-gate-card {
  background: rgba(23, 16, 37, 0.95);
  border: 1px solid rgba(199, 166, 255, 0.32);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  max-width: 460px;
  padding: 1.4rem;
  width: min(100%, 460px);
}

.beta-gate-card p {
  color: var(--muted);
  line-height: 1.55;
}

.beta-gate-card label {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 0.4rem;
  text-transform: uppercase;
}

.beta-gate-card input {
  background: rgba(9, 6, 16, 0.72);
  border: 1px solid rgba(199, 166, 255, 0.28);
  color: var(--ink);
  padding: 0.75rem 0.8rem;
}

.beta-gate-card button {
  background: linear-gradient(135deg, #eadbff, var(--violet));
  color: #13091d;
  padding: 0.78rem 0.9rem;
}

.beta-gate-error {
  color: var(--red);
  font-weight: 900;
  min-height: 1rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.55rem, 3.1vw, 2.55rem);
  letter-spacing: 0;
  line-height: 0.98;
}

h2 {
  font-size: 1.08rem;
}

button,
input,
select {
  border-radius: 8px;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.topbar,
.app-shell {
  margin: 0 auto;
  max-width: 1440px;
  padding-inline: 1.25rem;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.55rem;
  padding-top: 0.9rem;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  margin-bottom: 0.42rem;
  text-transform: uppercase;
}

.sync-card {
  align-items: center;
  background: rgba(23, 16, 37, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  min-width: 230px;
  padding: 0.62rem 0.78rem;
}

.sync-card small {
  color: var(--muted);
  display: block;
  font-weight: 750;
  margin-top: 0.12rem;
}

.status-dot {
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 20px currentColor;
  color: var(--gold);
  height: 0.72rem;
  width: 0.72rem;
}

.status-dot.good {
  background: var(--lime);
  color: var(--lime);
}

.status-dot.bad {
  background: var(--red);
  color: var(--red);
}

.app-shell {
  padding-bottom: 2rem;
}

.slate-toolbar {
  align-items: end;
  background: rgba(23, 16, 37, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 180px 160px minmax(0, 1fr);
  padding: 0.9rem;
}

.date-control {
  display: block;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 0.42rem;
}

input,
select {
  background: #10091a;
  border: 1px solid var(--line);
  color: var(--ink);
  min-width: 0;
  padding: 0.72rem 0.78rem;
}

#refreshBtn {
  background: linear-gradient(135deg, #eadbff, var(--violet));
  color: #13091d;
  min-height: 43px;
  padding: 0.75rem 1rem;
}

.toolbar-note {
  align-self: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.45;
}

.environment-shell,
.game-rail-shell {
  background: rgba(23, 16, 37, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 1rem;
  overflow: hidden;
}

.rail-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.75rem;
  font-weight: 950;
  justify-content: space-between;
  letter-spacing: 0.12em;
  padding: 0.65rem 0.9rem;
  text-transform: uppercase;
}

.rail-title strong {
  color: var(--cyan);
}

.environment-rail,
.game-rail {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.7rem;
  scrollbar-color: var(--line) transparent;
}

.env-card {
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  flex: 0 0 250px;
  gap: 0.28rem;
  padding: 0.7rem;
  text-align: left;
}

.env-card.active,
.env-card:hover {
  background: rgba(199, 166, 255, 0.13);
  border-color: rgba(199, 166, 255, 0.58);
}

.env-game-line {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.env-card strong {
  font-size: 0.82rem;
}

.env-game-line b {
  color: var(--cyan);
  font-size: 0.68rem;
}

.env-card span {
  font-size: 0.8rem;
  font-weight: 950;
}

.env-read {
  font-size: 0.95rem !important;
  letter-spacing: 0.01em;
}

.env-launch {
  color: var(--cyan);
}

.env-card small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.game-tab {
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  flex: 0 0 246px;
  gap: 0.4rem;
  padding: 0.72rem;
  text-align: left;
}

.game-tab.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(199, 166, 255, 0.42), 0 0 32px rgba(141, 92, 255, 0.18);
}

.game-tab-top,
.game-tab-bottom {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.game-teams {
  font-size: 0.96rem;
  font-weight: 950;
}

.game-time {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
}

.game-weather {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 950;
  padding: 0.25rem 0.48rem;
  white-space: nowrap;
}

.badge.live,
.pill.green {
  background: rgba(216, 180, 255, 0.16);
  color: var(--lime);
}

.badge.demo,
.pill.gold {
  background: rgba(199, 166, 255, 0.14);
  color: #d9c4ff;
}

.badge.off,
.pill.red {
  background: rgba(255, 90, 104, 0.16);
  color: var(--red);
}

.lineup-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1;
  margin-left: 0.25rem;
  padding: 0.18rem 0.36rem;
  vertical-align: middle;
}

.lineup-chip.confirmed {
  background: rgba(57, 255, 136, 0.14);
  color: #7dffb1;
}

.lineup-chip.expected {
  background: rgba(199, 166, 255, 0.14);
  color: #d9c4ff;
}

.summary-grid,
.matchup-grid,
.leader-strip,
.lineup-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slip-builder-shell {
  background: rgba(23, 16, 37, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 1rem;
  overflow: hidden;
}

.slip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.slip-actions button,
.add-slip-btn,
.slip-leg button {
  background: rgba(199, 166, 255, 0.13);
  border: 1px solid rgba(199, 166, 255, 0.28);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
  padding: 0.48rem 0.62rem;
}

.slip-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  padding: 0.8rem;
}

.slip-card {
  background: rgba(16, 9, 26, 0.7);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
}

.slip-card-head {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
}

.slip-card-head h3,
.slip-card-head h4 {
  font-size: 0.8rem;
  margin: 0;
  text-transform: uppercase;
}

.slip-card-head span {
  background: rgba(199, 166, 255, 0.13);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 950;
  padding: 0.22rem 0.5rem;
}

.slip-mini {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slip-list,
.recap-lines {
  display: grid;
  gap: 0.45rem;
}

.slip-leg,
.saved-leg {
  align-items: center;
  background: rgba(23, 16, 37, 0.74);
  border: 1px solid rgba(199, 166, 255, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(0, 1fr) 36px 70px 64px 94px auto;
  padding: 0.55rem;
}

.slip-leg strong,
.slip-leg small,
.saved-leg strong,
.saved-slip small {
  display: block;
  min-width: 0;
}

.slip-leg strong,
.saved-leg strong {
  font-size: 0.76rem;
}

.slip-leg small,
.slip-leg span,
.saved-slip small,
.recap-lines span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
}

.slip-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.slip-warnings span {
  background: rgba(255, 208, 102, 0.12);
  border: 1px solid rgba(255, 208, 102, 0.24);
  border-radius: 999px;
  color: #ffe39a;
  font-size: 0.64rem;
  font-weight: 900;
  padding: 0.22rem 0.46rem;
}

.saved-slip {
  background: rgba(23, 16, 37, 0.74);
  border: 1px solid rgba(199, 166, 255, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem;
}

.saved-leg {
  grid-template-columns: minmax(0, 1fr) 120px;
  padding: 0.38rem 0.48rem;
}

.saved-leg select {
  padding: 0.42rem 0.45rem;
}

.bug-report-fab {
  background: linear-gradient(135deg, #eadbff, var(--violet));
  border: 1px solid rgba(199, 166, 255, 0.42);
  border-radius: 999px;
  bottom: 1rem;
  box-shadow: var(--shadow);
  color: #13091d;
  padding: 0.72rem 0.95rem;
  position: fixed;
  right: 1rem;
  z-index: 80;
}

.bug-modal {
  align-items: center;
  background: rgba(6, 3, 12, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 100;
}

.bug-panel {
  background: rgba(23, 16, 37, 0.98);
  border: 1px solid rgba(199, 166, 255, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
  max-height: 92vh;
  max-width: 720px;
  overflow-y: auto;
  padding: 1rem;
  width: min(720px, 100%);
}

.bug-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.bug-panel label {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 950;
  gap: 0.35rem;
}

.bug-panel textarea {
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 0.72rem 0.78rem;
  resize: vertical;
}

.bug-upload {
  border: 1px dashed rgba(199, 166, 255, 0.32);
  border-radius: 8px;
  padding: 0.72rem;
}

.bug-upload span,
.bug-context span,
.bug-result span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.bug-context,
.bug-result {
  background: rgba(199, 166, 255, 0.08);
  border: 1px solid rgba(199, 166, 255, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem;
}

.bug-context strong,
.bug-result strong {
  color: var(--cyan);
}

.bug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.bug-actions button,
.bug-close,
.bug-admin-card select {
  background: rgba(199, 166, 255, 0.13);
  border: 1px solid rgba(199, 166, 255, 0.28);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
  padding: 0.48rem 0.62rem;
}

#bugSubmitBtn {
  background: linear-gradient(135deg, #eadbff, var(--violet));
  color: #13091d;
}

.bug-admin-shell {
  background: rgba(23, 16, 37, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 1rem;
  overflow: hidden;
}

.bug-admin-list {
  display: grid;
  gap: 0.6rem;
  padding: 0.8rem;
}

.bug-dashboard {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.8rem;
}

.bug-dashboard article,
.bug-issue-summary {
  background: rgba(16, 9, 26, 0.72);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 8px;
  padding: 0.8rem;
}

.bug-dashboard span,
.bug-issue-summary h3,
.bug-admin-list h3 {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bug-dashboard strong {
  color: var(--ink);
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 0.4rem;
}

.bug-issue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0.8rem 0.2rem;
}

.bug-issue-summary h3 {
  flex: 1 0 100%;
}

.bug-issue-summary span {
  align-items: center;
  background: rgba(199, 166, 255, 0.1);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
}

.bug-issue-summary strong {
  color: var(--cyan);
}

.bug-admin-list h3 {
  padding: 0.1rem 0.1rem 0.2rem;
}

.bug-admin-card {
  background: rgba(16, 9, 26, 0.7);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 0.4rem;
  padding: 0.7rem;
}

.bug-admin-card.high-priority {
  border-color: rgba(255, 90, 104, 0.65);
}

.bug-admin-card span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
}

.bug-admin-card p {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.4;
}

.bug-admin-card small,
.bug-admin-card a {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

@media (max-width: 760px) {
  .bug-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.metric-card,
.panel,
.pitch-card,
.matchup-hero,
.leader-strip article,
.empty-state {
  background: rgba(23, 16, 37, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
}

#oddsDebug {
  grid-column: 1 / -1;
}

.action-center-head {
  display: grid;
  gap: 0.2rem;
}

.action-center-head span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.action-center-head strong {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
}

.action-slip-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.4rem;
}

.action-slip-card {
  background: rgba(16, 9, 26, 0.72);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
}

.action-slip-title {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.action-slip-title h3 {
  font-size: 0.82rem;
  margin: 0;
}

.action-slip-title span {
  background: rgba(199, 166, 255, 0.13);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 950;
  padding: 0.18rem 0.42rem;
}

.action-slip-list {
  display: grid;
  gap: 0.35rem;
}

.action-slip-row {
  align-items: center;
  background: rgba(23, 16, 37, 0.76);
  border: 1px solid rgba(199, 166, 255, 0.13);
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: 2rem minmax(0, 1fr) 2.5rem;
  padding: 0.42rem;
}

.action-slip-row:hover {
  border-color: rgba(199, 166, 255, 0.42);
}

.action-slip-row span,
.action-slip-row b {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 950;
}

.action-slip-row strong {
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-slip-row small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  grid-column: 2 / 3;
}

.add-entire-slip {
  background: linear-gradient(135deg, rgba(234, 219, 255, 0.95), rgba(141, 92, 255, 0.95));
  border: 0;
  color: #13091d;
  justify-self: start;
  padding: 0.5rem 0.68rem;
}

.metric-card span,
.metric-card small,
.pitch-card span,
.pitch-card small,
.leader-strip span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.metric-card strong {
  font-size: 1.6rem;
}

.insight-card {
  align-content: start;
}

.insight-card > strong {
  font-size: 1.15rem;
}

.insight-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

#simPreviewList {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-color: var(--line) transparent;
}

.insight-list small {
  color: var(--muted);
  font-weight: 800;
}

.insight-row {
  align-items: center;
  background: rgba(16, 9, 26, 0.82);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 3.8rem minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  padding: 0.48rem 0.56rem;
  text-align: left;
}

.insight-row.sim-row {
  grid-template-columns: 2.4rem minmax(105px, 0.7fr) minmax(0, 1.5fr);
  grid-template-rows: auto auto;
}

.insight-row:hover {
  border-color: rgba(199, 166, 255, 0.48);
}

.insight-row span {
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.insight-row strong {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-row b {
  color: var(--cyan);
  font-size: 0.78rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-row small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  grid-column: 2 / -1;
}

.insight-row.missing-row {
  opacity: 0.78;
}

.empty-state {
  margin-top: 1rem;
  padding: 2rem;
}

.empty-state h2 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  margin-bottom: 0.65rem;
}

.empty-state p:last-child {
  color: var(--muted);
  line-height: 1.55;
  max-width: 720px;
}

.hidden {
  display: none !important;
}

.matchup-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.55fr) minmax(230px, 0.55fr);
}

.matchup-hero,
.pitch-card,
.leader-strip article {
  padding: 1rem;
}

.matchup-hero h2 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1;
}

#selectedVenue {
  font-size: 0.5rem;
}

.matchup-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-weight: 850;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.weather-chip,
.weather-chip-group {
  align-items: center;
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.42rem 0.65rem;
}

.weather-chip-group {
  background: transparent;
  border: 0;
  flex-wrap: wrap;
  padding: 0;
}

.wind-out {
  color: #66e596;
}

.wind-cross {
  color: #f3cf74;
}

.wind-in {
  color: #ff6c7a;
}

.env-favorable {
  color: #66e596;
}

.env-neutral {
  color: #f3cf74;
}

.env-suppressed {
  color: #ff6c7a;
}

.env-grade,
.env-score {
  color: var(--cyan);
}

.pitch-card {
  display: grid;
  gap: 0.35rem;
}

.pitch-card strong {
  font-size: 1.25rem;
}

.leader-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leader-strip article {
  display: grid;
  gap: 0.32rem;
}

.leader-strip strong {
  font-size: 1.2rem;
}

.lineup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-table {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.8rem;
}

.stat-preview-grid {
  display: grid;
  gap: 0.1rem;
  grid-template-columns: minmax(170px, 1.9fr) 34px repeat(var(--stat-cols), minmax(42px, 1fr));
  min-width: max-content;
}

.stat-preview-grid.no-lineup {
  grid-template-columns: minmax(170px, 1.9fr) repeat(var(--stat-cols), minmax(42px, 1fr));
}

.preview-head {
  background: rgba(199, 166, 255, 0.11);
  border: 1px solid rgba(199, 166, 255, 0.18);
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 950;
  min-width: 0;
  padding: 0.38rem 0.22rem;
  position: relative;
  text-transform: uppercase;
}

.preview-head:hover {
  background: rgba(199, 166, 255, 0.2);
  color: var(--ink);
}

.preview-head[data-tip]:hover::after {
  background: #140c21;
  border: 1px solid rgba(199, 166, 255, 0.45);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  content: attr(data-tip);
  font-size: 0.72rem;
  font-weight: 750;
  left: 50%;
  line-height: 1.35;
  max-width: 260px;
  min-width: 190px;
  padding: 0.65rem;
  position: absolute;
  text-align: left;
  text-transform: none;
  top: calc(100% + 0.35rem);
  transform: translateX(-50%);
  white-space: normal;
  z-index: 20;
}

.name-head {
  text-align: left;
}

.preview-name {
  align-items: center;
  background: rgba(16, 9, 26, 0.74);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  min-width: 0;
  padding: 0.34rem;
  text-align: left;
}

.preview-name:hover,
.preview-name.active {
  background: rgba(199, 166, 255, 0.12);
  border-color: rgba(199, 166, 255, 0.45);
}

.preview-name strong,
.preview-name small {
  display: block;
  min-width: 0;
}

.preview-name strong {
  font-size: 0.72rem;
  line-height: 1.12;
  white-space: normal;
}

.preview-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-name small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
}

.mini-logo {
  align-items: center;
  background: linear-gradient(135deg, rgba(234, 219, 255, 0.25), rgba(141, 92, 255, 0.22));
  border: 1px solid rgba(199, 166, 255, 0.35);
  border-radius: 999px;
  display: flex;
  font-size: 0.68rem;
  font-weight: 950;
  height: 1.62rem;
  justify-content: center;
  letter-spacing: 0.02em;
  width: 1.62rem;
}

.preview-cell {
  align-items: center;
  border-radius: 6px;
  display: flex;
  font-size: 0.66rem;
  font-weight: 900;
  justify-content: center;
  min-width: 0;
  padding: 0.38rem 0.18rem;
}

.ulx-dashboard {
  display: grid;
  gap: 0.75rem;
}

.ulx-section {
  background: rgba(16, 9, 26, 0.58);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 0.55rem;
  padding: 0.72rem;
}

.ulx-section-head {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}

.ulx-section-head h3 {
  font-size: 0.76rem;
  margin: 0;
  text-transform: uppercase;
}

.ulx-section-head span {
  background: rgba(199, 166, 255, 0.13);
  border: 1px solid rgba(199, 166, 255, 0.22);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 0.18rem 0.48rem;
}

.ulx-list {
  display: grid;
  gap: 0.35rem;
}

.ulx-row {
  align-items: center;
  background: rgba(23, 16, 37, 0.82);
  border: 1px solid rgba(199, 166, 255, 0.14);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(0, 1fr) 44px 64px 70px 74px auto;
  padding: 0.52rem;
  text-align: left;
}

.ulx-row:hover,
.spot-row:hover {
  background: rgba(199, 166, 255, 0.13);
  border-color: rgba(199, 166, 255, 0.42);
}

.ulx-row.pool-green {
  border-color: rgba(67, 214, 125, 0.7);
}

.ulx-row.pool-yellow {
  border-color: rgba(244, 199, 96, 0.7);
}

.ulx-row.pool-red {
  border-color: rgba(255, 90, 104, 0.62);
}

.ulx-row strong,
.ulx-row small {
  display: block;
  min-width: 0;
}

.ulx-row strong {
  font-size: 0.78rem;
  line-height: 1.1;
}

.ulx-row small,
.ulx-row em,
.ulx-row i,
.ulx-empty,
.ulx-note {
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 850;
}

.ulx-row b {
  color: var(--cyan);
  font-size: 0.9rem;
}

.ulx-row em,
.ulx-row i {
  text-align: right;
}

.shortlist-row {
  align-items: center;
  background: rgba(23, 16, 37, 0.82);
  border: 1px solid rgba(199, 166, 255, 0.14);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(130px, 1.2fr) repeat(6, minmax(72px, 0.8fr)) auto;
  padding: 0.55rem;
}

.shortlist-row.has-lineup {
  grid-template-columns: minmax(130px, 1.2fr) repeat(7, minmax(68px, 0.8fr)) auto;
}

.shortlist-row:hover {
  background: rgba(199, 166, 255, 0.13);
  border-color: rgba(199, 166, 255, 0.42);
}

.shortlist-row strong,
.shortlist-row b,
.shortlist-row small {
  display: block;
  min-width: 0;
}

.shortlist-row strong {
  font-size: 0.76rem;
}

.shortlist-row b {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 950;
  text-transform: uppercase;
}

.shortlist-row small {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.add-slip-btn {
  justify-self: end;
  white-space: nowrap;
}

.drawer-add-slip {
  justify-self: start;
}

.ulx-empty,
.ulx-note {
  background: rgba(199, 166, 255, 0.08);
  border-radius: 8px;
  line-height: 1.35;
  padding: 0.55rem;
}

.spot-grid {
  display: grid;
  gap: 0.25rem;
  grid-template-columns: minmax(128px, 1.5fr) 44px 52px 58px 54px 64px 44px;
}

.spot-grid.no-lineup {
  grid-template-columns: minmax(118px, 1.6fr) repeat(4, minmax(58px, 1fr));
}

.spot-head {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 950;
  text-transform: uppercase;
}

.spot-head span {
  background: rgba(199, 166, 255, 0.1);
  border-radius: 5px;
  padding: 0.35rem 0.2rem;
  text-align: center;
}

.spot-head span:first-child,
.spot-row span:first-child {
  text-align: left;
}

.spot-card {
  background: rgba(23, 16, 37, 0.82);
  border: 1px solid rgba(199, 166, 255, 0.12);
  border-radius: 7px;
  overflow: hidden;
}

.spot-card.make {
  border-color: rgba(67, 214, 125, 0.7);
}

.spot-card.borderline {
  border-color: rgba(244, 199, 96, 0.7);
}

.spot-card.miss {
  border-color: rgba(255, 90, 104, 0.62);
}

.spot-card[open] {
  background: rgba(199, 166, 255, 0.08);
}

.spot-card summary {
  list-style: none;
}

.spot-card summary::-webkit-details-marker {
  display: none;
}

.spot-row {
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 850;
  padding: 0.36rem;
  text-align: center;
  width: 100%;
}

.spot-row.flagged {
  border-color: rgba(67, 214, 125, 0.54);
}

.spot-row span {
  align-items: center;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow-wrap: normal;
}

.spot-gap {
  white-space: nowrap;
}

.spot-name,
.spot-odds,
.spot-ulx {
  color: var(--ink);
  font-weight: 950;
}

.spot-odds,
.spot-ulx {
  color: var(--cyan);
}

.add-slip-btn.compact {
  border-radius: 999px;
  font-size: 0.78rem;
  justify-self: center;
  min-width: 30px;
  padding: 0.22rem 0.46rem;
}

.spot-detail-panel {
  border-top: 1px solid rgba(199, 166, 255, 0.12);
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.46rem;
}

.spot-detail-panel span {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.64rem;
  font-weight: 850;
  gap: 0.25rem;
  line-height: 1.25;
}

.spot-detail-panel b {
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 100%;
}

.spot-detail-panel em {
  background: rgba(199, 166, 255, 0.12);
  border-radius: 999px;
  color: var(--cyan);
  font-style: normal;
  padding: 0.12rem 0.36rem;
  white-space: nowrap;
}

.model-shortlist {
  margin-top: 0.75rem;
}

.final-board {
  margin-top: 0.75rem;
}

.final-market {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.final-market h4 {
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.final-tier-grid {
  display: grid;
  gap: 0.55rem;
}

.final-tier-card,
.core-four-card {
  background: rgba(23, 16, 37, 0.72);
  border: 1px solid rgba(199, 166, 255, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 0.42rem;
  padding: 0.55rem;
}

.final-tier-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.final-tier-head strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.final-tier-head span {
  background: rgba(199, 166, 255, 0.14);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 950;
  padding: 0.15rem 0.42rem;
}

.final-player-card {
  background: rgba(11, 7, 20, 0.56);
  border: 1px solid rgba(199, 166, 255, 0.14);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 0.18rem;
  padding: 0.48rem;
  text-align: left;
}

.final-player-card.pool-green {
  border-color: rgba(67, 214, 125, 0.7);
}

.final-player-card.pool-yellow {
  border-color: rgba(244, 199, 96, 0.7);
}

.final-player-card.pool-red {
  border-color: rgba(255, 90, 104, 0.62);
}

.final-player-card:hover,
.core-four-row:hover {
  background: rgba(199, 166, 255, 0.13);
  border-color: rgba(199, 166, 255, 0.42);
}

.final-player-card strong,
.final-player-card b,
.final-player-card em,
.final-player-card i,
.final-player-card small {
  display: block;
  font-style: normal;
}

.final-player-card strong {
  font-size: 0.74rem;
}

.final-player-card b {
  color: var(--cyan);
  font-size: 0.68rem;
}

.final-player-card em,
.final-player-card i,
.final-player-card small,
.core-four-row small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
}

.core-four-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.core-four-row {
  align-items: center;
  background: rgba(11, 7, 20, 0.56);
  border: 1px solid rgba(199, 166, 255, 0.14);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 0.38rem;
  grid-template-columns: 34px minmax(0, 1fr) minmax(84px, 0.8fr);
  padding: 0.42rem;
  text-align: left;
}

.core-four-row span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
}

.core-four-row strong {
  font-size: 0.72rem;
}

.preview-cell.great {
  background: rgba(75, 210, 130, 0.86);
  color: #06130b;
}

.preview-cell.bad {
  background: rgba(255, 90, 104, 0.86);
  color: #210508;
}

.preview-cell.neutral,
.preview-cell.muted {
  background: rgba(199, 166, 255, 0.16);
  color: var(--ink);
}

.metric-tabs {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
}

.metric-tab {
  background: #10091a;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.55rem 0.8rem;
}

.metric-tab.active {
  background: rgba(199, 166, 255, 0.16);
  border-color: rgba(199, 166, 255, 0.58);
  color: var(--cyan);
}

.source-note {
  background: rgba(16, 9, 26, 0.72);
  border: 1px solid rgba(199, 166, 255, 0.18);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.45;
  margin: 0 1rem 0.85rem;
  padding: 0.65rem 0.75rem;
}

.savant-shell {
  background: rgba(23, 16, 37, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 1rem;
  overflow: visible;
}

.panel {
  min-width: 0;
  overflow: visible;
}

.panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.table-tools input {
  max-width: 340px;
  width: 100%;
}

.compact {
  display: block;
}

.savant-section {
  border-top: 1px solid var(--line);
  padding: 1rem;
}

.selected-hitter {
  -webkit-overflow-scrolling: touch;
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr);
  padding: 1rem;
}

.selected-hitter h2 {
  font-size: 1.45rem;
}

.selected-hitter small {
  color: var(--muted);
  font-weight: 800;
}

.selected-metrics {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
}

.selected-metrics span {
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.18rem;
  padding: 0.65rem;
}

.selected-metrics b {
  color: var(--cyan);
}

.selected-metrics small {
  font-size: 0.68rem;
  text-transform: uppercase;
}

.sample-note {
  background: rgba(199, 166, 255, 0.1);
  border: 1px solid rgba(199, 166, 255, 0.24);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  grid-column: 1 / -1;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
}

.player-drawer {
  background: rgba(6, 4, 10, 0.72);
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 60;
}

.drawer-panel {
  background:
    radial-gradient(circle at 0 0, rgba(199, 166, 255, 0.18), transparent 22rem),
    linear-gradient(180deg, #171025, #0f0819);
  border-left: 1px solid rgba(199, 166, 255, 0.32);
  box-shadow: -26px 0 54px rgba(0, 0, 0, 0.42);
  height: 100%;
  max-width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  position: relative;
  width: 540px;
}

.drawer-close {
  background: rgba(199, 166, 255, 0.12);
  border: 1px solid rgba(199, 166, 255, 0.26);
  color: var(--ink);
  padding: 0.58rem 0.8rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.drawer-hero {
  align-items: center;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 3rem minmax(0, 1fr);
  padding: 0.55rem 5rem 1rem 0;
}

.drawer-hero .mini-logo {
  height: 2.65rem;
  width: 2.65rem;
}

.drawer-hero h2 {
  font-size: 1.8rem;
  line-height: 1;
}

.drawer-hero small,
.drawer-section small {
  color: var(--muted);
  font-weight: 800;
}

.drawer-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
  padding: 1rem 0;
}

.drawer-section h3 {
  font-size: 0.95rem;
  margin: 0;
  text-transform: uppercase;
}

.drawer-tabs {
  background: rgba(16, 9, 26, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.25rem 0 0.7rem;
  padding: 0.35rem;
}

.drawer-tabs button {
  background: transparent;
  color: var(--muted);
  padding: 0.58rem;
}

.drawer-tabs button.active {
  background: rgba(199, 166, 255, 0.16);
  color: var(--cyan);
}

.drawer-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.drawer-stat {
  background: rgba(16, 9, 26, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.2rem;
  padding: 0.72rem;
}

.drawer-stat span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.drawer-stat strong {
  color: var(--cyan);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.drawer-note {
  color: var(--ink);
}

.edge-columns {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edge-columns .note {
  display: grid;
  gap: 0.42rem;
}

.edge-columns .note strong {
  color: var(--cyan);
}

.edge-columns .note span {
  color: var(--muted);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
}

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

.sim-run-grid span {
  background: rgba(16, 9, 26, 0.82);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: grid;
  font-size: 0.68rem;
  font-weight: 850;
  gap: 0.12rem;
  padding: 0.42rem;
}

.sim-run-grid b {
  color: var(--muted);
  font-size: 0.6rem;
}

.section-title {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.stat-card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.85rem;
}

.stat-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
}

.stat-card-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stat-card-head strong {
  color: var(--cyan);
  font-size: 1.2rem;
}

.stat-line {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.25rem 0.45rem;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  padding: 0.45rem;
  position: relative;
  text-align: left;
}

.stat-line:hover,
.stat-line.active {
  background: rgba(199, 166, 255, 0.09);
}

.stat-line span,
.stat-line small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.stat-line strong,
.stat-line small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-line b {
  color: var(--cyan);
  grid-column: 3;
  grid-row: 1 / span 2;
  place-self: center end;
}

.stat-line i {
  background: linear-gradient(90deg, #eadbff, var(--violet));
  border-radius: 999px;
  bottom: 0.2rem;
  display: block;
  height: 0.18rem;
  left: 0.45rem;
  opacity: 0.8;
  position: absolute;
  width: var(--width);
}

.breakdown {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.score-ring {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(var(--cyan) calc(var(--score) * 1%), #2d1d42 0);
  border-radius: 50%;
  display: grid;
  margin: 0 auto;
  max-width: 180px;
  place-items: center;
  width: 68%;
}

.score-ring span {
  align-items: center;
  background: var(--panel);
  border-radius: 50%;
  display: grid;
  font-size: 2rem;
  font-weight: 950;
  height: 72%;
  place-items: center;
  width: 72%;
}

.factor {
  display: grid;
  gap: 0.35rem;
}

.factor-top {
  color: var(--muted);
  display: flex;
  font-size: 0.8rem;
  font-weight: 900;
  justify-content: space-between;
}

.bar {
  background: #2d1d42;
  border-radius: 999px;
  height: 0.58rem;
  overflow: hidden;
}

.bar span {
  background: linear-gradient(90deg, #eadbff, var(--violet));
  display: block;
  height: 100%;
  width: var(--width);
}

.note,
.mini-grid {
  background: #10091a;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 0.9rem;
}

.warning {
  background: rgba(240, 195, 84, 0.13);
  border: 1px solid rgba(240, 195, 84, 0.35);
  border-radius: 8px;
  color: #ffe6a3;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.45;
  padding: 0.85rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.mini-grid div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.15rem;
  padding: 0.72rem;
}

.mini-grid div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.mini-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mini-grid strong {
  font-size: 0.96rem;
}

@media (max-width: 1050px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .slate-toolbar,
    .summary-grid,
    .game-insight-grid,
  .action-slip-grid,
  .slip-grid,
  .matchup-grid,
  .leader-strip,
  .lineup-grid,
  .selected-hitter,
  .stat-card-grid {
    grid-template-columns: 1fr;
  }

  .selected-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-preview-grid {
    grid-template-columns: minmax(160px, 1.8fr) 34px repeat(var(--stat-cols), minmax(40px, 1fr));
  }

  .stat-preview-grid.no-lineup {
    grid-template-columns: minmax(160px, 1.8fr) repeat(var(--stat-cols), minmax(40px, 1fr));
  }

  .sim-run-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ulx-row,
  .shortlist-row,
  .slip-leg,
  .spot-grid {
    grid-template-columns: 1fr;
  }

  .ulx-row em,
  .ulx-row i,
  .add-slip-btn {
    justify-self: start;
    text-align: left;
  }

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

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .table-tools input {
    max-width: none;
  }

  .savant-shell {
    max-height: none;
    overflow: visible;
  }

  .preview-table,
  .selected-hitter,
  .savant-section {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .selected-hitter {
    max-height: none;
    overflow-y: visible;
  }

  .drawer-panel {
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .topbar {
    padding-inline: 0.75rem;
  }

  .metric-tabs,
  .source-note,
  .selected-hitter,
  .savant-section,
  .preview-table {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  .preview-table {
    max-width: 100%;
  }

  .stat-preview-grid {
    grid-template-columns: minmax(180px, 1.9fr) 34px repeat(var(--stat-cols), minmax(54px, 1fr));
  }

  .stat-preview-grid.no-lineup {
    grid-template-columns: minmax(180px, 1.9fr) repeat(var(--stat-cols), minmax(54px, 1fr));
  }

  .player-drawer {
    align-items: stretch;
  }

  .drawer-panel {
    border-left: 0;
    width: 100%;
  }
}
