:root {
  --navy: #07324f;
  --bg: #f3eadb;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --ink: #07324f;
  --muted: rgba(7, 50, 79, 0.68);
  --accent: #a91f24;
  --performance-needs-work: #a91f24;
  --performance-good: #07324f;
  --performance-exceptional: #2f6f3e;
  --accent-soft: rgba(7, 50, 79, 0.08);
  --line: rgba(7, 50, 79, 0.22);
  --shadow: 0 18px 48px rgba(7, 50, 79, 0.08);
  --success: #07324f;
  --chart-hot: #a91f24;
  --chart-cold: #07324f;
  --chart-mixed: rgba(7, 50, 79, 0.56);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(243, 234, 219, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav-shell,
.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand-logo {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  padding: 10px 4px 10px 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-button {
  padding: 10px 14px;
  box-shadow: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--ink);
}

.page-shell {
  padding: 42px 0 56px;
}

.narrow-shell {
  max-width: 640px;
}

.hero {
  margin-bottom: 28px;
}

.compact-hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.22rem;
}

.hero-copy,
.section-copy,
.empty-state,
.stat-label,
label span,
th,
.form-message {
  color: var(--muted);
}

.hero-copy,
.section-copy {
  line-height: 1.6;
}

.hero-copy {
  max-width: 44rem;
  margin-bottom: 0;
  font-size: 1.04rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.featured-metrics-panel {
  border-color: rgba(169, 31, 36, 0.45);
  box-shadow: 0 22px 48px rgba(7, 50, 79, 0.14);
}

.featured-metrics-panel .stat-card {
  border-color: rgba(169, 31, 36, 0.28);
}

.featured-metrics-panel .performance-score-card {
  grid-column: 1 / -1;
  border-width: 2px;
}

.performance-score-card strong {
  font-size: 2.4rem;
}

.performance-score-needs-work {
  color: var(--performance-needs-work);
}

.performance-score-good {
  color: var(--performance-good);
}

.performance-score-exceptional {
  color: var(--performance-exceptional);
}

.performance-score-badge.performance-score-needs-work,
.performance-score-progress.performance-score-needs-work {
  background: var(--performance-needs-work);
  color: #ffffff;
}

.performance-score-badge.performance-score-good,
.performance-score-progress.performance-score-good {
  background: var(--performance-good);
  color: #ffffff;
}

.performance-score-badge.performance-score-exceptional,
.performance-score-progress.performance-score-exceptional {
  background: var(--performance-exceptional);
  color: #ffffff;
}

.metric-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(7, 50, 79, 0.14);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.metric-color-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.metric-color-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
}

.metric-color-dot--needs-improvement {
  background: var(--performance-needs-work);
}

.metric-color-dot--good {
  background: var(--performance-good);
}

.metric-color-dot--exceptional {
  background: var(--performance-exceptional);
}

.panel + .panel,
.dashboard,
.two-column-layout {
  margin-top: 20px;
}

.landing-header {
  background: rgba(243, 234, 219, 0.96);
}

.landing-nav .nav-link {
  font-weight: 800;
}

.landing-signup-link {
  background: var(--accent);
  color: var(--bg);
}

.landing-signup-link:hover,
.landing-signup-link:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

.landing-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.landing-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 50, 79, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(7, 50, 79, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.78fr);
  gap: 36px;
  align-items: center;
}

.landing-hero-copy h1,
.landing-final-cta h2 {
  color: var(--ink);
  letter-spacing: 0;
}

.landing-hero-copy p,
.landing-final-cta p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  text-align: center;
}

.landing-button-primary {
  background: var(--accent);
  color: var(--bg);
}

.landing-button-secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.landing-hero-visual {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: min(100%, 245px);
  padding: 12px;
  border: 2px solid var(--navy);
  border-radius: 32px;
  background: var(--navy);
  box-shadow: 0 22px 48px rgba(7, 50, 79, 0.2);
}

.phone-mockup-hero {
  width: min(100%, 310px);
  transform: rotate(1.5deg);
}

.phone-screen {
  display: grid;
  gap: 10px;
  min-height: 350px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  color: var(--ink);
  align-content: start;
}

.preview-header {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-title {
  font-size: 1.25rem;
  font-weight: 900;
}

.preview-option,
.preview-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 800;
}

.preview-option.is-selected {
  border-color: rgba(169, 31, 36, 0.4);
  background: rgba(169, 31, 36, 0.08);
  color: var(--accent);
}

.preview-field-grid,
.preview-heat-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.preview-field-grid {
  grid-template-columns: repeat(3, 1fr);
}

.preview-field-grid span,
.preview-heat-grid span {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 50, 79, 0.06);
}

.preview-heat-grid {
  grid-template-columns: repeat(5, 1fr);
}

.preview-heat-grid span:nth-child(7),
.preview-heat-grid span:nth-child(13),
.preview-heat-grid span:nth-child(19) {
  background: rgba(169, 31, 36, 0.68);
}

.preview-heat-grid span:nth-child(9),
.preview-heat-grid span:nth-child(17) {
  background: rgba(7, 50, 79, 0.72);
}

.preview-field {
  position: relative;
  min-height: 210px;
  border: 2px solid var(--navy);
  border-bottom-width: 0;
  border-radius: 160px 160px 12px 12px;
  background: linear-gradient(135deg, transparent 49%, rgba(7, 50, 79, 0.14) 50%, transparent 51%);
  overflow: hidden;
}

.spray-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
}

.spray-dot-one {
  top: 34%;
  left: 28%;
}

.spray-dot-two {
  top: 18%;
  left: 54%;
}

.spray-dot-three {
  top: 48%;
  left: 70%;
  background: var(--performance-exceptional);
}

.landing-section {
  padding: 56px 0;
}

.landing-section-muted {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.36);
}

.landing-section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.landing-section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.preview-grid,
.benefit-grid,
.feature-card-grid,
.audience-grid {
  display: grid;
  gap: 16px;
}

.preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.benefit-grid,
.feature-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.benefit-grid article,
.feature-card-grid article,
.audience-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.benefit-grid strong,
.feature-card-grid article,
.audience-grid h3 {
  color: var(--ink);
  font-weight: 900;
}

.benefit-grid p,
.audience-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feature-card-grid article {
  display: flex;
  align-items: center;
  min-height: 88px;
  border-left: 5px solid var(--accent);
}

.landing-final-cta {
  padding: 64px 0 80px;
  text-align: center;
  background: var(--navy);
  color: var(--bg);
}

.landing-final-cta .eyebrow,
.landing-final-cta h2,
.landing-final-cta p {
  color: var(--bg);
}

.landing-final-cta h2,
.landing-final-cta p {
  margin-left: auto;
  margin-right: auto;
}

.landing-final-cta .text-link {
  color: var(--bg);
  text-decoration: underline;
}

.waitlist-form {
  width: min(100%, 560px);
  margin: 24px auto 14px;
}

.waitlist-form-title,
.waitlist-form label,
.waitlist-sport-toggle legend {
  display: block;
  margin-bottom: 10px;
  color: var(--bg);
  font-size: 1.05rem;
  font-weight: 900;
}

.waitlist-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.waitlist-form-full {
  grid-column: 1 / -1;
}

.waitlist-form label span {
  display: block;
  margin-bottom: 8px;
}

.waitlist-form input[type="text"],
.waitlist-form input[type="email"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(243, 234, 219, 0.42);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  background: #ffffff;
}

.waitlist-sport-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.waitlist-sport-toggle legend {
  grid-column: 1 / -1;
  width: 100%;
}

.waitlist-sport-toggle label {
  margin: 0;
}

.waitlist-sport-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.waitlist-sport-toggle label span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  border: 1px solid rgba(243, 234, 219, 0.42);
  border-radius: 999px;
  color: var(--bg);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.waitlist-sport-toggle input:checked + span {
  border-color: #ffffff;
  color: var(--ink);
  background: #ffffff;
}

.waitlist-sport-toggle input:focus-visible + span {
  outline: 3px solid rgba(243, 234, 219, 0.42);
  outline-offset: 2px;
}

.waitlist-submit-button {
  width: 100%;
  margin-top: 14px;
  position: relative;
  gap: 10px;
}

.waitlist-submit-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.waitlist-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(243, 234, 219, 0.42);
  border-top-color: var(--bg);
  border-radius: 999px;
  animation: waitlist-spin 700ms linear infinite;
}

.waitlist-submit-button.is-loading .waitlist-spinner {
  display: inline-block;
}

@keyframes waitlist-spin {
  to {
    transform: rotate(360deg);
  }
}

.waitlist-message {
  min-height: 1.25rem;
  margin: 10px 0 0;
  color: var(--bg);
  font-weight: 800;
}

.waitlist-message[data-status="success"],
.waitlist-message[data-status="info"] {
  color: var(--bg);
}

.waitlist-message[data-status="error"] {
  color: #ffd9d9;
}

@media (max-width: 980px) {
  .landing-hero-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero-visual {
    justify-content: flex-start;
  }

  .preview-grid,
  .benefit-grid,
  .feature-card-grid,
  .audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-shell {
    width: min(100% - 24px, 1120px);
  }

  .landing-hero {
    padding-top: 32px;
  }

  .landing-cta-row,
  .landing-button {
    width: 100%;
  }

  .waitlist-form-grid,
  .waitlist-sport-toggle {
    grid-template-columns: 1fr;
  }

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

  .preview-grid,
  .benefit-grid,
  .feature-card-grid,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .phone-mockup,
  .phone-mockup-hero {
    width: min(100%, 320px);
    transform: none;
  }

  .phone-screen {
    min-height: 300px;
  }
}

body[data-page="landing"] {
  background: var(--bg);
}

.landing-page {
  overflow: hidden;
}

.landing-header {
  background: rgba(243, 234, 219, 0.86);
}

.landing-shell {
  width: min(1040px, calc(100% - 36px));
}

.landing-hero {
  padding: 58px 0 84px;
  border-bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.72), rgba(243, 234, 219, 0) 46%), var(--bg);
  background-size: auto;
}

.landing-hero-inner,
.landing-story {
  display: grid;
  gap: 28px;
  justify-items: center;
}

.landing-copy {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.landing-copy-center {
  max-width: 860px;
}

.landing-copy h1 {
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(3.25rem, 10vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.landing-copy h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(2.25rem, 6vw, 4.35rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.landing-copy h2 + h2 {
  color: var(--accent);
}

.landing-copy p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.landing-cta-row {
  justify-content: center;
  margin-top: 16px;
}

.landing-button {
  min-height: 50px;
  padding: 13px 24px;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.landing-button:hover,
.landing-button:focus-visible {
  transform: translateY(-1px);
}

.landing-button-primary {
  background: var(--navy);
  color: var(--bg);
  box-shadow: 0 14px 30px rgba(7, 50, 79, 0.18);
}

.landing-button-secondary {
  background: rgba(255, 255, 255, 0.72);
}

.landing-device {
  width: min(100%, 280px);
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(7, 50, 79, 0.26);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(7, 50, 79, 0.98), rgba(7, 50, 79, 0.9));
  box-shadow: 0 22px 54px rgba(7, 50, 79, 0.14);
}

.landing-device-hero {
  width: min(100%, 300px);
}

.landing-device-wide {
  width: min(100%, 720px);
  border-radius: 34px;
}

.landing-device img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: cover;
  object-position: top center;
  border-radius: 22px;
  background: #ffffff;
}

.landing-device-wide img {
  max-height: 520px;
  object-fit: contain;
}

.landing-story-section {
  padding: 72px 0;
  background: var(--bg);
}

.landing-story-section + .landing-story-section {
  border-top: 1px solid rgba(7, 50, 79, 0.08);
}

.landing-section-cream {
  background: var(--bg);
  color: var(--ink);
}

.landing-section-navy {
  background: var(--navy);
  color: var(--bg);
}

.landing-section-cream .landing-copy h1,
.landing-section-cream .landing-copy h2,
.landing-section-cream .landing-final-cta h2 {
  color: var(--ink);
}

.landing-section-cream .landing-copy p,
.landing-section-cream .landing-final-cta p {
  color: #333333;
}

.landing-section-navy .landing-copy h1,
.landing-section-navy .landing-copy h2,
.landing-section-navy .landing-final-cta h2 {
  color: var(--bg);
}

.landing-section-navy .landing-copy p,
.landing-section-navy .landing-final-cta p {
  color: rgba(255, 255, 255, 0.88);
}

.landing-section-navy + .landing-section-cream,
.landing-section-cream + .landing-section-navy {
  border-top: 0;
}

.landing-section-navy .landing-device {
  border-color: rgba(243, 234, 219, 0.38);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26);
}

.landing-section-navy .landing-device img {
  box-shadow: 0 0 0 1px rgba(7, 50, 79, 0.1);
}

.landing-section-cream .landing-device {
  background: linear-gradient(180deg, rgba(7, 50, 79, 0.98), rgba(7, 50, 79, 0.9));
}

.landing-section-cream .landing-button-primary {
  background: var(--navy);
  color: var(--bg);
  box-shadow: 0 14px 30px rgba(7, 50, 79, 0.18);
}

.landing-section-cream .waitlist-form-title,
.landing-section-cream .waitlist-form label,
.landing-section-cream .waitlist-sport-toggle legend,
.landing-section-cream .waitlist-message {
  color: var(--ink);
}

.landing-section-cream .waitlist-form input[type="text"],
.landing-section-cream .waitlist-form input[type="email"],
.landing-section-cream .waitlist-sport-toggle label span {
  border-color: rgba(7, 50, 79, 0.2);
}

.landing-section-cream .waitlist-sport-toggle label span {
  color: var(--ink);
  background: rgba(7, 50, 79, 0.06);
}

.landing-section-cream .waitlist-sport-toggle input:checked + span {
  border-color: var(--navy);
  color: var(--bg);
  background: var(--navy);
}

.landing-section-navy .landing-button-primary,
.landing-section-navy .landing-button-secondary {
  border-color: rgba(243, 234, 219, 0.5);
  background: var(--bg);
  color: var(--navy);
}

.landing-section-navy .text-link {
  color: var(--bg);
}

.landing-section-navy .waitlist-form-title,
.landing-section-navy .waitlist-form label,
.landing-section-navy .waitlist-sport-toggle legend,
.landing-section-navy .waitlist-message {
  color: var(--bg);
}

.development-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 620px;
  margin: 28px auto 0;
  padding: 0;
  list-style: none;
}

.development-list li {
  padding: 9px 14px;
  border: 1px solid rgba(7, 50, 79, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  font-weight: 900;
}

.landing-section-navy .development-list li {
  border-color: rgba(29, 53, 87, 0.32);
  background: #f8f4ec;
  color: #1d3557;
}

.landing-final-cta {
  padding: 88px 0 100px;
  background: var(--bg);
}

.landing-final-cta h2 {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 0.95;
}

.landing-final-cta p {
  max-width: 560px;
  color: #333333;
}

.landing-final-cta .text-link {
  color: var(--navy);
  text-decoration: underline;
}

.waitlist-form {
  margin-top: 32px;
}

.waitlist-form-hero {
  width: min(100%, 640px);
  margin: 32px auto 0;
  padding: 16px;
  border: 1px solid rgba(7, 50, 79, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(7, 50, 79, 0.1);
}

.waitlist-form-hero label {
  color: var(--ink);
}

.waitlist-form-hero .waitlist-form-title,
.waitlist-form-hero .waitlist-sport-toggle legend {
  color: var(--ink);
}

.waitlist-form-hero input[type="text"],
.waitlist-form-hero input[type="email"],
.waitlist-form-hero .waitlist-sport-toggle label span {
  border-color: rgba(7, 50, 79, 0.2);
}

.waitlist-form-hero .waitlist-sport-toggle label span {
  color: var(--ink);
  background: rgba(7, 50, 79, 0.06);
}

.waitlist-form-hero .waitlist-sport-toggle input:checked + span {
  border-color: var(--navy);
  color: var(--bg);
  background: var(--navy);
}

.waitlist-form-hero .waitlist-message {
  color: var(--muted);
}

.waitlist-form-hero .waitlist-message[data-status="success"],
.waitlist-form-hero .waitlist-message[data-status="info"] {
  color: var(--success);
}

.waitlist-form-hero .waitlist-message[data-status="error"] {
  color: var(--accent);
}

@media (min-width: 900px) {
  .landing-story {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 54px;
    align-items: center;
  }

  .landing-story-section {
    padding: 92px 0;
  }

  .landing-story-text-only {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing-shell {
    width: min(100% - 28px, 1040px);
  }

  .landing-hero {
    padding: 34px 0 68px;
  }

  .landing-story-section {
    padding: 62px 0;
  }

  .landing-device,
  .landing-device-hero,
  .landing-device-wide {
    width: min(100%, 286px);
    border-radius: 30px;
  }

  .landing-device img {
    max-height: 420px;
    border-radius: 22px;
  }

  .landing-copy h1 {
    font-size: clamp(3rem, 14vw, 4.65rem);
  }

  .landing-copy h2 {
    font-size: clamp(2.35rem, 12vw, 3.8rem);
  }

  .development-list {
    justify-content: flex-start;
  }

  .development-list li {
    font-size: 0.92rem;
  }
}

.dashboard,
.two-column-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

body[data-page="dashboard"] .dashboard-snapshot-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card {
  grid-column: span 2;
}

body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card:nth-child(5) {
  grid-column: 2 / span 2;
}

body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card:nth-child(6) {
  grid-column: 4 / span 2;
}

body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card:nth-child(7) {
  grid-column: 6 / span 2;
}

body[data-page="games"] .games-season-snapshot-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

body[data-page="games"] .games-season-snapshot-grid .stat-card {
  grid-column: span 2;
}

body[data-page="games"] .games-season-snapshot-grid .stat-card:nth-child(5) {
  grid-column: 2 / span 2;
}

body[data-page="games"] .games-season-snapshot-grid .stat-card:nth-child(6) {
  grid-column: 4 / span 2;
}

body[data-page="games"] .games-season-snapshot-grid .stat-card:nth-child(7) {
  grid-column: 6 / span 2;
}

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

.stat-card,
.mini-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.9rem;
  line-height: 1.05;
}

.stat-label--with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.metric-info-button {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(7, 50, 79, 0.42);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(7, 50, 79, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.metric-info-button:hover,
.metric-info-button:focus-visible,
.metric-info-button[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
  outline: none;
}

.metric-info-popover {
  --metric-info-arrow-left: 24px;
  position: absolute;
  z-index: 40;
  width: min(300px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid rgba(7, 50, 79, 0.18);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(7, 50, 79, 0.18);
}

.metric-info-popover::before {
  position: absolute;
  top: -7px;
  left: var(--metric-info-arrow-left);
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(7, 50, 79, 0.18);
  border-left: 1px solid rgba(7, 50, 79, 0.18);
  background: #ffffff;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.metric-info-popover h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.metric-info-popover section + section {
  margin-top: 12px;
}

.metric-info-popover section > * + * {
  margin-top: 8px;
}

.metric-info-popover h4 {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-info-popover p,
.metric-info-popover li,
.metric-info-popover a {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.metric-info-popover ul {
  padding-left: 18px;
  margin: 0;
}

.metric-info-popover a {
  color: var(--accent);
  font-weight: 800;
}

.metric-info-popover img,
.metric-info-popover video {
  display: block;
  max-width: 100%;
  border-radius: 10px;
}

.metric-info-note {
  margin-top: 8px;
}

.metric-info-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(7, 50, 79, 0.12);
  font-style: italic;
}

.metric-good {
  color: var(--performance-exceptional);
  font-weight: 700;
}

.metric-average {
  color: var(--performance-good);
  font-weight: 700;
}

.metric-poor {
  color: var(--performance-needs-work);
  font-weight: 700;
}

.mini-card {
  padding: 18px;
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.account-summary-setting {
  max-width: 320px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.account-summary-setting .form-message {
  margin: 8px 0 0;
}

.insight-stack {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.text-link {
  padding-top: 2px;
  color: var(--accent);
  font-weight: 700;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: var(--bg);
  font-weight: 800;
  text-align: center;
}

.button-link:hover,
.button-link:focus-visible {
  background: var(--navy);
  color: var(--bg);
  transform: translateY(-1px);
  outline: none;
}

.game-form,
.login-form {
  display: grid;
  gap: 16px;
}

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

.form-panel {
  align-self: start;
}

.game-builder,
.current-at-bat,
.pitch-sequence-wrap,
.saved-at-bats-wrap {
  margin-top: 20px;
}

.new-game-view,
.log-panel {
  margin-top: 20px;
}

.builder-header,
.builder-actions {
  display: grid;
  gap: 10px;
}

.game-entry-actions {
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-items: center;
  margin-top: 16px;
}

.step-back-actions {
  grid-template-columns: max-content;
}

.step-back-button {
  min-width: 96px;
}

.logged-games-actions {
  grid-template-columns: max-content;
  margin-top: 16px;
}

.at-bat-card {
  margin-top: 16px;
}

.at-bat-card h4 {
  margin-bottom: 10px;
}

.location-grid {
  --zone-gap: 6px;
  --zone-border-gap: 4px;
  display: grid;
  position: relative;
  width: min(100%, 560px);
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--zone-gap);
  margin: 16px auto 0;
}

.location-grid::after {
  content: "";
  position: absolute;
  top: calc(((((100% - (var(--zone-gap) * 6)) / 7) + var(--zone-gap)) * 2) - var(--zone-border-gap));
  left: calc(((((100% - (var(--zone-gap) * 6)) / 7) + var(--zone-gap)) * 2) - var(--zone-border-gap));
  width: calc((((100% - (var(--zone-gap) * 6)) / 7) * 3) + (var(--zone-gap) * 2) + (var(--zone-border-gap) * 2));
  height: calc((((100% - (var(--zone-gap) * 6)) / 7) * 3) + (var(--zone-gap) * 2) + (var(--zone-border-gap) * 2));
  border: 3px solid var(--navy);
  border-radius: 16px;
  pointer-events: none;
  z-index: 2;
}

.zone-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  box-shadow: none;
  text-align: center;
  position: relative;
  z-index: 1;
}

.zone-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.zone-count {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.zone-cell.is-zone {
  background: var(--panel-solid);
  color: var(--ink);
  border: 1px solid rgba(7, 50, 79, 0.42);
}

.zone-cell.is-outside {
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  border: 1px dashed var(--line);
}

.zone-cell.is-selected {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(7, 50, 79, 0.12);
  border-color: var(--accent);
}

.result-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid button {
  box-shadow: none;
}

.log-panel .choice-grid button,
.pitch-type-modal .choice-grid button,
.location-grid .zone-cell {
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: none;
}

.log-panel .choice-grid button:hover,
.log-panel .choice-grid button:focus-visible,
.pitch-type-modal .choice-grid button:hover,
.pitch-type-modal .choice-grid button:focus-visible,
.location-grid .zone-cell:hover,
.location-grid .zone-cell:focus-visible {
  box-shadow: 0 12px 24px rgba(7, 50, 79, 0.12);
}

.choice-grid button.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(169, 31, 36, 0.16);
}

.pitch-type-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 50, 79, 0.24);
}

.pitch-type-modal {
  width: min(100%, 460px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
  box-shadow: 0 24px 60px rgba(7, 50, 79, 0.18);
}

.pitch-type-modal h4 {
  margin-bottom: 14px;
  text-align: center;
}

.pitch-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clickable-game-row {
  cursor: pointer;
}

.clickable-game-row:hover {
  background: rgba(7, 50, 79, 0.05);
}

.clickable-game-row:focus-visible {
  outline: 2px solid rgba(169, 31, 36, 0.28);
  outline-offset: -2px;
}

.table-action-button {
  padding: 9px 12px;
  border-radius: 12px;
  box-shadow: none;
  white-space: nowrap;
}

.game-review-view {
  margin-top: 20px;
}

.review-at-bat-card {
  display: grid;
  gap: 10px;
}

.review-at-bat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-at-bat-heading .secondary-button {
  padding: 9px 12px;
  border-radius: 12px;
  box-shadow: none;
}

.at-bat-edit-form {
  display: grid;
  gap: 14px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.edit-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  color: var(--ink);
  font: inherit;
}

select:focus {
  outline: 2px solid rgba(169, 31, 36, 0.18);
  border-color: var(--accent);
}

.pitch-sequence,
.saved-at-bats {
  display: grid;
  gap: 10px;
}

.pitch-chip,
.saved-at-bat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.saved-at-bat-heading,
.review-at-bat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-at-bat-edit-link {
  flex: 0 0 auto;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  color: var(--navy);
  box-shadow: none;
  font-size: 0.88rem;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.saved-at-bat-edit-link:hover,
.saved-at-bat-edit-link:focus-visible {
  background: transparent;
  color: #031f32;
  box-shadow: none;
  text-decoration: underline;
  transform: none;
  outline: none;
}

.saved-at-bat-edit-link:active {
  color: var(--accent);
  transform: translateY(1px);
}

.saved-at-bat-edit-link:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.saved-at-bat-edit-button {
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: none;
  font-size: 0.88rem;
  white-space: nowrap;
}

.saved-at-bat-edit-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.saved-at-bat-sequence {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.compact-empty {
  margin: 0;
}

.chart-view {
  display: none;
}

.chart-view.is-active {
  display: block;
}

.chart-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.chart-category-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(243, 234, 219, 0.72) 100%);
  box-shadow: 0 12px 30px rgba(7, 50, 79, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.chart-category-card:hover,
.chart-category-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(169, 31, 36, 0.32);
  box-shadow: 0 18px 42px rgba(7, 50, 79, 0.1);
  outline: none;
}

.chart-category-card h2 {
  margin-bottom: 10px;
}

.chart-category-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.chart-category-action,
.back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.chart-category-action {
  min-width: 150px;
  padding: 11px 16px;
  background: var(--accent);
  color: var(--bg);
}

.back-link {
  padding: 10px 14px;
  color: var(--bg);
  background: var(--navy);
  white-space: nowrap;
}

.chart-controls,
.chart-overview,
.chart-legend,
.zone-map-wrap {
  margin-top: 20px;
}

.chart-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.date-filter-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1 1 320px;
  min-width: 0;
  max-width: 100%;
}

.spray-date-filter-group {
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.filter-label {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 280px;
}

.chart-overview {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  gap: 14px;
  justify-content: start;
}

.chart-legend {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  color: var(--muted);
}

.zone-map-wrap {
  display: grid;
  justify-items: center;
}

.zone-map {
  width: min(100%, 560px);
  margin: 0 auto;
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(7, 50, 79, 0.12);
}

.legend-hit {
  background: rgba(169, 31, 36, 0.8);
}

.legend-mixed {
  background: rgba(7, 50, 79, 0.56);
}

.legend-out {
  background: rgba(7, 50, 79, 0.8);
}

.zone-map .zone-cell {
  cursor: default;
  visibility: visible;
}

.zone-map .zone-cell:hover,
.zone-map .zone-cell:focus-visible {
  transform: none;
  box-shadow: none;
}

.zone-map .zone-cell.is-outside .zone-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.zone-map .zone-cell.is-zone .zone-label {
  color: var(--ink);
}

.spray-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.spray-field-card,
.spray-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.spray-field-stage {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1536 / 1260;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.spray-field-placeholder {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
  user-select: none;
  pointer-events: none;
}

.spray-marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spray-chart-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--navy), 0 4px 10px rgba(7, 50, 79, 0.18);
  transform: translate(-50%, -50%);
}

.spray-chart-marker--hit {
  background: var(--accent);
}

.spray-chart-marker--out {
  background: var(--navy);
}

.spray-chart-marker--ground {
  background: var(--navy);
}

.spray-chart-marker--line {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--accent);
  transform: translate(-50%, -50%) rotate(45deg);
}

.spray-chart-marker--fly {
  background: #ffffff;
}

.spray-legend-dot--ground {
  background: var(--navy);
}

.spray-legend-dot--line {
  background: var(--accent);
}

.spray-legend-dot--fly {
  background: #ffffff;
}

.spray-legend-dot--hard {
  background: var(--accent);
}

.spray-legend-dot--hit {
  background: var(--accent);
}

.spray-legend-dot--out {
  background: var(--navy);
}

.spray-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 92px;
}

.spray-panel h3 {
  margin-bottom: 14px;
}

.spray-panel label {
  margin-bottom: 12px;
}

.spray-panel button {
  width: 100%;
}

.spray-legend-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  color: var(--muted);
  list-style: none;
}

.spray-legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spray-legend-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(7, 50, 79, 0.1);
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

label span {
  font-size: 0.92rem;
}

input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  color: var(--ink);
  font: inherit;
  box-sizing: border-box;
}

input[type="date"] {
  min-height: 52px;
  padding: 12px 14px;
  line-height: 1.2;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

input[type="date"]::-webkit-date-and-time-value {
  min-height: 1.2em;
  margin: 0;
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  flex: 0 0 auto;
  margin-left: 6px;
}

input:focus {
  outline: 2px solid rgba(169, 31, 36, 0.18);
  border-color: var(--accent);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 800;
  color: var(--bg);
  background: var(--navy);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 12px 24px rgba(7, 50, 79, 0.18);
}

.secondary-button {
  color: var(--bg);
  background: var(--navy);
  border: 1px solid rgba(7, 50, 79, 0.32);
  box-shadow: none;
}

.game-form button {
  grid-column: 1 / -1;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(7, 50, 79, 0.24);
}

.nav-button:hover,
.nav-button:focus-visible {
  box-shadow: 0 12px 24px rgba(7, 50, 79, 0.2);
}

.form-message {
  min-height: 1.25rem;
  margin: 4px 0 0;
  font-size: 0.94rem;
}

.form-message.is-success {
  color: var(--success);
}

.auth-switch {
  margin: 16px 0 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
}

thead tr {
  border-bottom: 1px solid var(--line);
}

tbody tr + tr {
  border-top: 1px solid var(--line);
}

tbody td {
  font-weight: 600;
}

.logged-games-table tbody tr + tr {
  border-top: 1px solid var(--line);
}

.logged-game-card-row td {
  padding: 8px 0;
}

.logged-game-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.logged-game-date {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.3;
}

.logged-game-opponent,
.logged-game-average,
.logged-game-score {
  margin: 0;
}

.logged-game-opponent {
  color: var(--muted);
  font-weight: 700;
}

.logged-game-average,
.logged-game-score {
  color: var(--ink);
  font-weight: 800;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.pagination-button {
  min-width: 42px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: none;
}

.pagination-button[aria-current="page"] {
  background: var(--accent);
  color: var(--bg);
}

.empty-state {
  margin: 14px 0 0;
}

.chart-list {
  display: grid;
  gap: 16px;
}

.chart-row {
  display: grid;
  gap: 10px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.chart-meta {
  color: var(--muted);
  font-weight: 600;
}

.chart-bars {
  display: grid;
  gap: 8px;
}

.chart-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7, 50, 79, 0.12);
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
}

.chart-fill.hits {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 100%);
}

.chart-fill.at-bats {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy) 100%);
}

.game-choice-view,
.tournament-name-view {
  margin-top: 20px;
}

.choice-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-card-button {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 120px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: none;
}

.choice-card-button strong {
  font-size: 1.05rem;
}

.choice-card-button span,
.tournament-context {
  color: var(--muted);
  font-weight: 700;
}

body[data-page="games"] #game-choice-view .choice-card-button {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.single-field-form {
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
}

.tournament-game-actions {
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-items: center;
  margin-top: 10px;
}

.game-group-row td {
  padding-top: 22px;
  padding-bottom: 10px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .dashboard,
  .two-column-layout,
  .summary-grid,
  .advanced-grid {
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="games"] .games-season-snapshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="games"] .games-season-snapshot-grid .stat-card,
  body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .page-shell,
  .nav-shell {
    width: min(100% - 20px, 1080px);
  }

  .dashboard,
  .two-column-layout,
  .summary-grid,
  .advanced-grid,
  .game-form,
  .single-field-form,
  .game-entry-actions,
  .tournament-game-actions,
  .choice-grid,
  .choice-card-grid,
  .chart-selection-grid,
  .spray-chart-layout,
  .chart-overview {
    grid-template-columns: 1fr;
  }

  .spray-sidebar {
    position: static;
  }

  .edit-field-grid {
    grid-template-columns: 1fr;
  }

  .pitch-type-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="games"] .games-season-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .location-grid {
    --zone-gap: 5px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}


/* Mobile overflow fixes for field use */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body,
.site-header,
.nav-shell,
.page-shell,
.panel,
.dashboard,
.two-column-layout,
.summary-grid,
.advanced-grid,
.stat-card,
.mini-card {
  max-width: 100%;
}

.nav-shell,
.page-shell,
.panel,
.dashboard,
.two-column-layout,
.summary-grid,
.advanced-grid,
.stat-card,
.mini-card {
  min-width: 0;
}

.page-shell {
  overflow-x: hidden;
  padding-bottom: 120px;
}

.panel {
  overflow-x: hidden;
}

.summary-grid,
.advanced-grid {
  width: 100%;
  gap: 12px;
}

.stat-card,
.mini-card {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.stat-card {
  padding: 14px;
  text-align: center;
}

.stat-card strong {
  font-size: clamp(1.25rem, 7vw, 1.9rem);
  overflow-wrap: anywhere;
}

.mini-card strong {
  font-size: clamp(1rem, 4.8vw, 1.15rem);
  overflow-wrap: anywhere;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  line-height: 1.1;
  text-align: center;
}

@media (max-width: 767px) {
  .site-header {
    position: sticky;
    overflow-x: hidden;
  }

  .nav-shell {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    overflow-x: hidden;
  }

  .brand {
    align-self: center;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 8px;
    justify-content: stretch;
    overflow-x: hidden;
  }

  .nav-link,
  .nav-button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 8px;
    font-size: 0.84rem;
    white-space: normal;
  }

  .page-shell {
    width: 100%;
    max-width: 100%;
    padding: 16px 16px 120px;
    overflow-x: hidden;
  }

  .hero {
    margin-bottom: 20px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 2.7rem);
  }

  .panel {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 18px;
  }

  .dashboard,
  .two-column-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
  }

  .summary-grid,
  .advanced-grid,
  body[data-page="dashboard"] .dashboard-snapshot-grid,
  body[data-page="games"] .games-season-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  body[data-page="games"] .games-season-snapshot-grid .stat-card,
  body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card {
    grid-column: auto;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-label {
    font-size: 0.72rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .game-form,
  .single-field-form,
  .game-entry-actions,
  .tournament-game-actions,
  .choice-grid,
  .choice-card-grid,
  .date-filter-group,
  .edit-field-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  input,
  select,
  button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

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

@media (max-width: 380px) {
  .page-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .panel {
    padding: 14px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-card strong {
    font-size: clamp(1.15rem, 6.5vw, 1.55rem);
  }
}


/* Dashboard, Games, and Account mobile card proportions */
@media (max-width: 767px) {
  body[data-page="dashboard"] .panel,
  body[data-page="games"] #games-home-view > .panel,
  body[data-page="account"] .panel {
    padding: 20px 16px;
    overflow: hidden;
  }

  body[data-page="dashboard"] .summary-grid,
  body[data-page="games"] .games-season-snapshot-grid,
  body[data-page="account"] .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card,
  body[data-page="games"] .games-season-snapshot-grid .stat-card,
  body[data-page="account"] .dashboard-snapshot-grid .stat-card {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    padding: 18px 14px;
    border-radius: 18px;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid .stat-label,
  body[data-page="games"] .games-season-snapshot-grid .stat-label,
  body[data-page="account"] .dashboard-snapshot-grid .stat-label {
    font-size: clamp(0.85rem, 3.5vw, 1rem);
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid .stat-card strong,
  body[data-page="games"] .games-season-snapshot-grid .stat-card strong,
  body[data-page="account"] .dashboard-snapshot-grid .stat-card strong {
    font-size: clamp(2rem, 9vw, 3.25rem);
    line-height: 1;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  body[data-page="account"] .dashboard-snapshot-grid .stat-card strong {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }
}


/* Match Advanced Stats mobile metric card rhythm on target pages */
@media (max-width: 768px) {
  body[data-page="dashboard"] .dashboard-stat-grid,
  body[data-page="dashboard"] .snapshot-stat-grid,
  body[data-page="dashboard"] .stats-grid,
  body[data-page="dashboard"] .stat-grid,
  body[data-page="games"] .season-stat-grid,
  body[data-page="games"] .snapshot-stat-grid,
  body[data-page="games"] .stats-grid,
  body[data-page="games"] .stat-grid,
  body[data-page="account"] .dashboard-stat-grid,
  body[data-page="account"] .snapshot-stat-grid,
  body[data-page="account"] .stats-grid,
  body[data-page="account"] .stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
  }

  body[data-page="dashboard"] .dashboard-stat-card,
  body[data-page="dashboard"] .snapshot-stat-card,
  body[data-page="games"] .season-stat-card,
  body[data-page="games"] .snapshot-stat-card,
  body[data-page="account"] .dashboard-stat-card,
  body[data-page="account"] .snapshot-stat-card {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 118px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  body[data-page="dashboard"] .dashboard-stat-card .stat-label,
  body[data-page="dashboard"] .snapshot-stat-card .stat-label,
  body[data-page="games"] .season-stat-card .stat-label,
  body[data-page="games"] .snapshot-stat-card .stat-label,
  body[data-page="account"] .dashboard-stat-card .stat-label,
  body[data-page="account"] .snapshot-stat-card .stat-label {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    line-height: 1.25;
    font-size: 0.95rem;
  }

  body[data-page="dashboard"] .dashboard-stat-card .stat-value,
  body[data-page="dashboard"] .snapshot-stat-card .stat-value,
  body[data-page="games"] .season-stat-card .stat-value,
  body[data-page="games"] .snapshot-stat-card .stat-value,
  body[data-page="account"] .dashboard-stat-card .stat-value,
  body[data-page="account"] .snapshot-stat-card .stat-value {
    white-space: nowrap;
    font-size: clamp(2.25rem, 10vw, 3.5rem);
    line-height: 1;
  }

  body[data-page="account"] .dashboard-stat-card .stat-value,
  body[data-page="account"] .snapshot-stat-card .stat-value {
    white-space: normal;
    font-size: clamp(1.3rem, 6vw, 2rem);
  }
}


/* FINAL MOBILE STAT GRID OVERRIDES */
@media (max-width: 768px) {
  body[data-page="dashboard"] .dashboard-snapshot-grid,
  body[data-page="games"] .games-season-snapshot-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    align-items: stretch !important;
    grid-auto-flow: row !important;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid > .stat-card,
  body[data-page="games"] .games-season-snapshot-grid > .stat-card {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 118px !important;
    height: auto !important;
    padding: 18px 12px !important;
    display: flex !important;
    flex: initial !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid > .stat-card .stat-label,
  body[data-page="games"] .games-season-snapshot-grid > .stat-card .stat-label {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    line-height: 1.25 !important;
    font-size: 0.95rem !important;
    max-width: 100% !important;
  }

  body[data-page="dashboard"] .dashboard-snapshot-grid > .stat-card .stat-value,
  body[data-page="dashboard"] .dashboard-snapshot-grid > .stat-card > strong,
  body[data-page="games"] .games-season-snapshot-grid > .stat-card .stat-value,
  body[data-page="games"] .games-season-snapshot-grid > .stat-card > strong {
    white-space: nowrap !important;
    font-size: clamp(2.25rem, 10vw, 3.5rem) !important;
    line-height: 1 !important;
    max-width: 100% !important;
  }
}


/* Hit location field selector */
.pitch-location-helper {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.chart-location-helper {
  text-align: center;
}

.field-selector {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(48px, 1fr));
  gap: 8px;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, transparent 47%, rgba(7, 50, 79, 0.12) 48%, rgba(7, 50, 79, 0.12) 52%, transparent 53%),
    linear-gradient(45deg, transparent 47%, rgba(7, 50, 79, 0.12) 48%, rgba(7, 50, 79, 0.12) 52%, transparent 53%),
    rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.field-position {
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: none;
  font-size: 0.9rem;
}

.field-position-p { grid-area: 3 / 3; }
.field-position-c { grid-area: 5 / 3; }
.field-position-1b { grid-area: 3 / 5; }
.field-position-2b { grid-area: 2 / 4; }
.field-position-3b { grid-area: 3 / 1; }
.field-position-ss { grid-area: 2 / 2; }
.field-position-lf { grid-area: 1 / 1; }
.field-position-cf { grid-area: 1 / 3; }
.field-position-rf { grid-area: 1 / 5; }

@media (max-width: 420px) {
  .field-selector {
    grid-template-rows: repeat(5, minmax(44px, 1fr));
    gap: 7px;
    padding: 12px;
  }

  .field-position {
    min-height: 44px;
    border-radius: 12px;
  }
}


/* SVG hit location field */
svg.field-selector {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  overflow: visible;
  touch-action: manipulation;
}

.field-outfield {
  fill: #f3eadb;
  stroke: #07324f;
  stroke-width: 3;
  stroke-linejoin: round;
}

.field-infield-dirt {
  fill: #f3eadb;
  stroke: #07324f;
  stroke-width: 2.5;
}

.field-foul-line {
  fill: none;
  stroke: #07324f;
  stroke-width: 5;
  stroke-linecap: round;
}

.field-diamond-line {
  fill: none;
  stroke: #07324f;
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.field-pitcher-circle {
  fill: none;
  stroke: #07324f;
  stroke-width: 2.5;
}

.field-base,
.field-home-plate {
  fill: #ffffff;
  stroke: #07324f;
  stroke-width: 2;
}

.field-location {
  cursor: pointer;
  outline: none;
}

.field-hit-area {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.field-marker {
  fill: rgba(255, 255, 255, 0.92);
  stroke: #07324f;
  stroke-width: 2;
  transition: fill 140ms ease, stroke 140ms ease, transform 140ms ease;
}

.field-marker-label {
  fill: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.field-location:hover .field-marker,
.field-location:focus-visible .field-marker,
.field-location.is-selected .field-marker {
  fill: var(--accent);
  stroke: var(--accent);
}

.field-location:hover .field-marker-label,
.field-location:focus-visible .field-marker-label,
.field-location.is-selected .field-marker-label {
  fill: #ffffff;
}

@media (max-width: 520px) {
  svg.field-selector {
    max-width: 100%;
  }

  .field-marker-label {
    font-size: 0.76rem;
  }
}


/* FINAL CLEAN HIT LOCATION FIELD OVERRIDES */
svg.field-selector {
  display: block !important;
  width: 100% !important;
  max-width: 420px !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: transparent !important;
  overflow: visible !important;
  touch-action: manipulation;
}

.field-outfield {
  fill: #f3eadb !important;
  stroke: none !important;
}

.field-infield-dirt {
  fill: #f3eadb !important;
  stroke: none !important;
}

.field-foul-line {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 4 !important;
  stroke-linecap: round !important;
}

.field-diamond-line {
  display: none !important;
}

.field-pitcher-circle {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 2 !important;
  opacity: 0.9;
}

.field-base {
  fill: #ffffff !important;
  stroke: #07324f !important;
  stroke-width: 1.5 !important;
}

.field-home-plate {
  fill: #ffffff !important;
  stroke: #07324f !important;
  stroke-width: 1.5 !important;
}

.field-location {
  cursor: pointer;
  outline: none;
}

.field-hit-area {
  fill: transparent !important;
  stroke: transparent !important;
  opacity: 0 !important;
  pointer-events: all;
}

.field-marker {
  r: 4px;
  fill: #07324f !important;
  stroke: none !important;
  opacity: 0.95;
  transition: fill 140ms ease, r 140ms ease, opacity 140ms ease;
}

.field-marker-label {
  fill: #07324f !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 140ms ease, fill 140ms ease;
}

.field-location:hover .field-marker,
.field-location:focus-visible .field-marker,
.field-location.is-selected .field-marker {
  r: 7px;
  fill: var(--accent) !important;
  opacity: 1;
}

.field-location:hover .field-marker-label,
.field-location:focus-visible .field-marker-label,
.field-location.is-selected .field-marker-label {
  fill: var(--accent) !important;
  opacity: 1;
}

@media (max-width: 520px) {
  svg.field-selector {
    max-width: 100% !important;
  }
}


/* FINAL WIDE HIT LOCATION FIELD DESIGN */
.hit-location-helper {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.hit-location-image-button {
  position: relative;
  display: block;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1536 / 1260;
  padding: 0;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
  cursor: crosshair;
  touch-action: manipulation;
}

.hit-location-image-button:hover,
.hit-location-image-button:focus-visible {
  transform: none;
  box-shadow: 0 0 0 3px rgba(169, 31, 36, 0.12);
}

.hit-location-image {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.hit-location-selected-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--navy);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.hit-location-selected-marker[hidden] {
  display: none;
}

.hit-location-selection-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

svg.field-selector {
  display: block !important;
  width: 100% !important;
  max-width: 420px !important;
  height: auto !important;
  aspect-ratio: 500 / 360 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  overflow: visible !important;
  touch-action: manipulation;
}

.field-outfield {
  fill: #f3eadb !important;
  stroke: none !important;
}

.field-inner-outfield {
  fill: #ffffff !important;
  stroke: none !important;
}

.field-infield-dirt {
  fill: #f3eadb !important;
  stroke: none !important;
}

.field-diamond-fill {
  fill: #ffffff !important;
  stroke: none !important;
}

.field-foul-line {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 4 !important;
  stroke-linecap: round !important;
}

.field-diamond-line {
  display: none !important;
}

.field-pitcher-circle {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 1.8 !important;
  opacity: 0.85;
}

.field-base,
.field-home-plate {
  fill: #ffffff !important;
  stroke: #07324f !important;
  stroke-width: 1.5 !important;
}

.field-location {
  cursor: pointer;
  outline: none;
}

.field-hit-area {
  fill: transparent !important;
  stroke: transparent !important;
  opacity: 0 !important;
  pointer-events: all;
}

.field-marker {
  fill: #07324f !important;
  stroke: none !important;
  opacity: 0.96;
  transition: fill 140ms ease, r 140ms ease, opacity 140ms ease;
}

.field-marker-label {
  fill: #07324f !important;
  font-size: 0.64rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  opacity: 0.72 !important;
  pointer-events: none;
  user-select: none;
  transition: opacity 140ms ease, fill 140ms ease;
}

.field-location:hover .field-marker,
.field-location:focus-visible .field-marker,
.field-location.is-selected .field-marker {
  r: 7px;
  fill: var(--accent) !important;
  opacity: 1;
}

.field-location:hover .field-marker-label,
.field-location:focus-visible .field-marker-label,
.field-location.is-selected .field-marker-label {
  fill: var(--accent) !important;
  opacity: 1 !important;
}

@media (max-width: 520px) {
  svg.field-selector {
    max-width: 100% !important;
  }

  .field-marker-label {
    font-size: 0.58rem !important;
  }
}


/* FINAL SPRAY CHART FIELD TAP OVERRIDES */
svg.field-selector.spray-chart-field {
  display: block !important;
  width: 100% !important;
  max-width: 420px !important;
  height: auto !important;
  aspect-ratio: 500 / 420 !important;
  margin: 0 auto !important;
  overflow: visible !important;
  touch-action: manipulation;
}

.spray-chart-field .field-outfield {
  fill: #f3eadb !important;
  stroke: none !important;
}

.spray-chart-field .field-inner-outfield {
  fill: #ffffff !important;
  stroke: none !important;
}

.spray-chart-field .field-infield-dirt {
  fill: #f3eadb !important;
  stroke: none !important;
}

.spray-chart-field .field-diamond-fill {
  fill: #ffffff !important;
  stroke: none !important;
}

.spray-chart-field .field-foul-line {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 4 !important;
  stroke-linecap: round !important;
}

.spray-chart-field .field-pitcher-circle {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 1.6 !important;
  opacity: 0.8;
}

.spray-chart-field .field-base,
.spray-chart-field .field-home-plate {
  fill: #ffffff !important;
  stroke: #07324f !important;
  stroke-width: 1.4 !important;
}

.spray-chart-field .field-position-dot {
  fill: #07324f !important;
  stroke: none !important;
  opacity: 0.92;
  pointer-events: none;
}

.spray-chart-field .field-position-label {
  fill: #07324f !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  opacity: 0.68 !important;
  pointer-events: none;
  user-select: none;
}

.spray-chart-field .field-fair-territory {
  fill: transparent !important;
  stroke: none !important;
  pointer-events: all;
  cursor: crosshair;
}

.spray-chart-field .field-selected-marker {
  fill: var(--accent) !important;
  stroke: #ffffff !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 2px 4px rgba(7, 50, 79, 0.24));
  pointer-events: none;
}

.spray-chart-field .field-selected-marker[hidden] {
  display: none !important;
}
@media (max-width: 520px) {
  svg.field-selector.spray-chart-field {
    max-width: 100% !important;
  }

  .spray-chart-field .field-position-label {
    font-size: 9px !important;
  }
}


/* FINAL REFERENCE FIELD VISUAL OVERRIDES */
svg.field-selector.spray-chart-field {
  aspect-ratio: 500 / 360 !important;
}

.spray-chart-field .field-outfield,
.spray-chart-field .field-inner-outfield,
.spray-chart-field .field-diamond-fill,
.spray-chart-field .field-home-circle {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 3.5 !important;
  stroke-linecap: square !important;
  stroke-linejoin: miter !important;
}

.spray-chart-field .field-inner-outfield {
  stroke-width: 3 !important;
}

.spray-chart-field .field-diamond-fill {
  stroke-width: 3 !important;
}

.spray-chart-field .field-foul-line {
  fill: none !important;
  stroke: #07324f !important;
  stroke-width: 3.5 !important;
  stroke-linecap: square !important;
}

.spray-chart-field .field-pitcher-circle {
  fill: #ffffff !important;
  stroke: #07324f !important;
  stroke-width: 3 !important;
  opacity: 1 !important;
}

.spray-chart-field .field-base,
.spray-chart-field .field-home-plate {
  fill: #ffffff !important;
  stroke: #07324f !important;
  stroke-width: 3 !important;
}

.spray-chart-field .field-position-dot {
  display: none !important;
}

.spray-chart-field .field-position-label {
  fill: #07324f !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

.spray-chart-field .field-fair-territory {
  fill: transparent !important;
  stroke: none !important;
  pointer-events: all !important;
}

.spray-chart-field .field-selected-marker {
  fill: var(--accent) !important;
  stroke: #ffffff !important;
  stroke-width: 3 !important;
}
@media (max-width: 520px) {
  .spray-chart-field .field-position-label {
    font-size: 18px !important;
  }
}


/* CLEAN REFERENCE FIELD SVG */
.reference-hit-field {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 500 / 360;
  margin: 0 auto;
  overflow: visible;
  background: transparent;
  touch-action: manipulation;
}

.reference-field-boundary,
.reference-field-inner-arc,
.reference-field-diamond,
.reference-field-line,
.reference-field-home-arc {
  fill: none;
  stroke: #07324f;
  stroke-width: 3.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.reference-field-inner-arc,
.reference-field-diamond,
.reference-field-line,
.reference-field-home-arc {
  stroke-width: 3;
}

.reference-field-base,
.reference-field-home-plate {
  fill: #ffffff;
  stroke: #07324f;
  stroke-width: 3;
}

.reference-field-pitcher-circle {
  fill: #ffffff;
  stroke: #07324f;
  stroke-width: 3;
}

.reference-field-label {
  fill: #07324f;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}

.reference-field-fair-territory {
  fill: transparent;
  stroke: none;
  pointer-events: all;
  cursor: crosshair;
}

.reference-field-selected-marker {
  fill: var(--accent);
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(7, 50, 79, 0.24));
  pointer-events: none;
}

.reference-field-selected-marker[hidden] {
  display: none;
}
@media (max-width: 520px) {
  .reference-hit-field {
    max-width: 100%;
  }

  .reference-field-label {
    font-size: 18px;
  }
}
