@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --bg: #05070a;
  --bg-deep: #020304;
  --panel: rgba(11, 16, 22, 0.78);
  --panel-strong: rgba(16, 23, 31, 0.94);
  --ink: #f3f7fb;
  --muted: #9eafbd;
  --accent: #5fa8d3;
  --accent-2: #d8dee6;
  --line: rgba(142, 184, 212, 0.22);
  --silver: #d8dee6;
  --steel: #536473;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Rajdhani", "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(95, 168, 211, 0.24), transparent 30%),
    radial-gradient(circle at 88% 22%, rgba(216, 222, 230, 0.13), transparent 24%),
    linear-gradient(180deg, #010203 0%, #071019 38%, #020305 100%);
  min-height: 100vh;
}

body[data-user-role="coach"] {
  --bg: #05070a;
  --bg-deep: #020304;
  --ink: #f3f7fb;
  --muted: #9eafbd;
  --accent: #5fa8d3;
  --accent-2: #d8dee6;
  background:
    radial-gradient(circle at 18% 0%, rgba(95, 168, 211, 0.24), transparent 30%),
    radial-gradient(circle at 88% 22%, rgba(216, 222, 230, 0.13), transparent 24%),
    linear-gradient(180deg, #010203 0%, #071019 38%, #020305 100%);
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.site-header,
.hero,
.section {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: 1rem;
}

.hero {
  padding: 1.25rem 0 4rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(95, 168, 211, 0.28);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(3, 6, 10, 0.94), rgba(13, 22, 31, 0.88)),
    rgba(3, 6, 10, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  min-width: min(44vw, 24rem);
  min-height: 4.3rem;
  background: url("assets/shadow-lab-logo-transparent.png") left center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(95, 168, 211, 0.18));
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  background: var(--bg-deep);
  color: #f5efe4;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}

.brand-mark,
.brand-stack {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.brand-name,
.eyebrow,
h1,
h2,
h3 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

.brand-name {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.active-only,
.admin-only,
.coach-only {
  display: none;
}

body[data-user-status="active"] .active-only {
  display: inline-flex;
}

body[data-is-admin="true"] .admin-only {
  display: inline-flex;
}

body[data-is-coach="true"] .coach-only {
  display: inline-flex;
}

body[data-is-coach="true"] .coach-home-notifications {
  display: block;
}

body[data-user-status="active"] .pending-only {
  display: none;
}

.nav-cta,
.nav-tab,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
  text-decoration: none;
}

.nav-cta,
.primary-btn {
  background:
    linear-gradient(135deg, rgba(95, 168, 211, 0.98), rgba(25, 73, 103, 0.98));
  color: #f7fbff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.nav-tab {
  background: rgba(216, 222, 230, 0.06);
  color: var(--silver);
  border: 1px solid rgba(95, 168, 211, 0.18);
}

.nav-tab:hover,
.nav-tab.is-active {
  background: rgba(95, 168, 211, 0.18);
  color: #ffffff;
  border-color: rgba(95, 168, 211, 0.58);
  box-shadow: inset 0 0 0 1px rgba(216, 222, 230, 0.1);
}

.ghost-btn {
  background: transparent;
  color: var(--ink);
  outline: 1px solid var(--line);
}

.danger-account-button {
  color: #ffd7d7;
  background: rgba(153, 27, 27, 0.18);
  outline-color: rgba(255, 114, 114, 0.58);
}

.danger-account-button:hover {
  background: rgba(153, 27, 27, 0.34);
}

.nav-cta:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.card-panel,
.program-card,
.roadmap-item,
.contact-card {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid rgba(95, 168, 211, 0.22);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at top left, rgba(95, 168, 211, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(16, 23, 31, 0.94), rgba(4, 7, 11, 0.9));
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 1rem;
}

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

h1 {
  font-size: clamp(3.5rem, 8vw, 6.6rem);
  line-height: 0.92;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  line-height: 0.95;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
}

.hero-text,
.copy-block p,
.program-card p,
.roadmap-item p,
.contact p,
label {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.home-secondary {
  padding-top: 0;
}

.coach-home-notifications {
  padding-bottom: 1rem;
}

.coach-home-notifications .contact-card {
  max-width: 100%;
}

.home-notifications {
  padding-top: 0;
}

.notification-list {
  display: grid;
  gap: 0.9rem;
}

.notification-card {
  padding: 1rem;
}

.notification-card h3 {
  margin-bottom: 0.35rem;
}

.notification-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.notification-meta-stack {
  display: grid;
  gap: 0.25rem;
}

.notification-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.notification-content {
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.hero-stats li {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.hero-stats strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.hero-card {
  display: flex;
}

.card-panel {
  width: 100%;
  border-radius: 2rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(95, 168, 211, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(12, 18, 25, 0.98) 0%, rgba(2, 4, 7, 0.96) 100%);
  color: #f7fbff;
  position: relative;
  overflow: hidden;
}

.card-panel::after {
  content: "";
  position: absolute;
  inset: auto -3rem -3rem auto;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 168, 211, 0.36), transparent 68%);
}

.panel-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.track {
  padding: 1rem 0;
  border-top: 1px solid rgba(216, 222, 230, 0.18);
}

.track span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.track strong {
  font-size: 1.1rem;
}

.section {
  padding: 2rem 0 4rem;
}

.page-main {
  padding-bottom: 3rem;
}

.page-hero {
  padding-top: 2.25rem;
}

.page-title {
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.94;
  margin-bottom: 1rem;
}

.narrow-copy {
  max-width: 44rem;
}

.split,
.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.section-heading {
  margin-bottom: 1.2rem;
}

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

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

.program-card,
.roadmap-item {
  border-radius: 1.6rem;
  padding: 1.3rem;
}

.library-editor {
  max-width: none;
  width: 100%;
  margin-bottom: 1.4rem;
  align-items: start;
}

.library-editor textarea {
  min-height: 15rem;
}

.library-form {
  width: min(100%, 28rem);
  margin-top: 0.35rem;
}

.library-section {
  padding-top: 0;
}

.library-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.library-toolbar label {
  display: grid;
  gap: 0.35rem;
  min-width: min(100%, 18rem);
  font-weight: 800;
}

.library-toolbar select {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  background: rgba(7, 12, 18, 0.92);
  color: var(--ink);
  font: inherit;
}

.library-list {
  display: grid;
  gap: 1rem;
}

.library-category {
  display: grid;
  gap: 0.65rem;
}

.library-category-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.library-category-heading .eyebrow {
  margin-bottom: 0;
}

.library-category-heading span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.library-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.75rem;
}

.library-entry {
  box-shadow: none;
  min-width: 0;
  padding: 1rem;
}

.library-entry-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.65rem;
}

.library-entry-header h3 {
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.library-entry-content {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.scouting-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.scouting-sidebar {
  position: sticky;
  top: 7rem;
}

.scouting-form {
  display: grid;
  gap: 0.9rem;
}

.scouting-board {
  min-width: 0;
}

.scouting-team-list {
  display: grid;
  gap: 1rem;
}

.scouting-team-card {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(95, 168, 211, 0.14), transparent 38%),
    rgba(8, 13, 19, 0.78);
}

.scouting-team-header,
.pitcher-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.scouting-team-header h3,
.pitcher-card-header h3 {
  margin-bottom: 0.35rem;
}

.scouting-team-header p {
  color: var(--muted);
  margin-bottom: 0;
  white-space: pre-wrap;
}

.scouting-team-toggle {
  display: grid;
  gap: 0.2rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.scouting-team-toggle h3 {
  margin-bottom: 0;
}

.scouting-team-toggle span {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.pitcher-team-workspace {
  display: grid;
  gap: 0.75rem;
}

.pitcher-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.55rem;
}

.pitcher-select-button {
  display: grid;
  gap: 0.2rem;
  min-height: 3.6rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.75rem 0.85rem;
  background: rgba(216, 222, 230, 0.06);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.pitcher-select-button:hover,
.pitcher-select-button.is-selected {
  border-color: rgba(95, 168, 211, 0.64);
  background: rgba(95, 168, 211, 0.16);
  box-shadow: 0 0.65rem 1.2rem rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.pitcher-select-button strong {
  color: var(--ink);
}

.pitcher-select-button span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.pitcher-empty-state {
  border: 1px dashed var(--line);
  border-radius: 1.1rem;
  padding: 1rem;
  background: rgba(216, 222, 230, 0.06);
}

.pitcher-empty-state h3 {
  margin-bottom: 0.25rem;
}

.pitcher-empty-state p {
  margin: 0;
  color: var(--muted);
}

.pitcher-scout-card {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 0.9rem;
  background: rgba(216, 222, 230, 0.06);
}

.scout-note-block {
  display: grid;
  gap: 0.25rem;
}

.scout-note-block strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scout-note-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
}

.scout-tag-block {
  display: grid;
  gap: 0.35rem;
}

.scout-tag-block strong {
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scout-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scout-tag-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  background: rgba(7, 12, 18, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.scouted-pitch-grid {
  display: grid;
  gap: 0.45rem;
}

.scouted-pitch-pill {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.7rem 0.8rem;
  background: rgba(95, 168, 211, 0.1);
}

.scouted-pitch-pill strong {
  display: block;
  color: var(--ink);
}

.scouted-pitch-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.scouted-pitch-pill p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
}

.scouting-pitch-builder {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(27, 22, 19, 0.12);
  border-radius: 1.1rem;
  padding: 0.9rem;
}

.scouting-pitch-builder legend {
  padding: 0 0.4rem;
  color: var(--ink);
  font-weight: 900;
}

.scouting-pitch-list {
  display: grid;
  gap: 0.65rem;
}

.scouting-pitch-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
}

.scouting-pitch-notes {
  grid-column: 1 / -2;
}

.scouting-option-box {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 0.85rem;
  background: rgba(216, 222, 230, 0.06);
}

.scouting-option-box legend {
  padding: 0 0.4rem;
  color: var(--ink);
  font-weight: 900;
}

.scouting-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.5rem;
}

.scouting-check-grid label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  background: rgba(216, 222, 230, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.scouting-check-grid input {
  accent-color: var(--accent);
}

.percent-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(7, 12, 18, 0.92);
}

.percent-input input {
  border: 0;
  background: transparent;
}

.percent-input span {
  padding-right: 0.9rem;
  color: var(--muted);
  font-weight: 900;
}

.scouting-dialog input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 0.9rem;
  background: rgba(7, 12, 18, 0.92);
  color: var(--ink);
  font: inherit;
}

.scouting-dialog h2 {
  color: #ffffff;
}

.scouting-dialog .scouting-check-grid input {
  width: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.scouting-dialog .percent-input input {
  border: 0;
  background: transparent;
}

.program-index {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.banner {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.banner p {
  margin: 0;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

.contact-card {
  border-radius: 1.8rem;
  padding: 1.4rem;
  display: grid;
  gap: 0.9rem;
}

.contact-card label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.contact-card input,
.contact-card textarea,
.contact-card select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(7, 12, 18, 0.88);
  color: var(--ink);
}

input[type="date"],
input[type="week"],
input[type="time"] {
  box-sizing: border-box;
  display: block;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow: hidden;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="week"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
}

input[type="date"]::-webkit-datetime-edit,
input[type="week"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  display: block;
  width: 100%;
  min-width: 0;
}

.pitch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.profile-advanced-stats {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.coach-profile-stats-panel {
  margin-top: 1.25rem;
}

.profile-player-row {
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.profile-player-row:hover {
  background: rgba(95, 168, 211, 0.12);
}

.stat-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card-header h3 {
  margin-bottom: 0;
}

.stat-helper {
  max-width: 16rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.profile-zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  width: min(100%, 22rem);
  margin-inline: auto;
}

.profile-zone-cell {
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  border: 1px solid rgba(216, 222, 230, 0.24);
  color: #ffffff;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
}

.profile-zone-cell span {
  font-family: "Rajdhani", "Manrope", sans-serif;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hot-zone {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(191, 45, 45, 0.96), rgba(101, 16, 24, 0.96));
}

.cold-zone {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(54, 150, 205, 0.96), rgba(17, 58, 87, 0.98));
}

.neutral-zone {
  background:
    radial-gradient(circle at top left, rgba(95, 168, 211, 0.12), transparent 42%),
    rgba(7, 12, 18, 0.9);
}

.count-performance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.count-performance-card {
  position: relative;
  display: grid;
  gap: 0.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem;
  background: rgba(216, 222, 230, 0.06);
}

.count-performance-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--quality-fill, 0%);
  background:
    linear-gradient(90deg, rgba(95, 168, 211, 0.36), rgba(95, 168, 211, 0.14));
  pointer-events: none;
  transition: width 220ms ease;
}

.count-performance-card > * {
  position: relative;
  z-index: 1;
}

.count-performance-card strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}

.count-performance-card span {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
}

.count-performance-card small {
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  margin: 0.3rem 0;
}

.slash-card {
  text-align: center;
}

.stat-card p:last-child {
  margin-bottom: 0;
}

.pitch-form {
  gap: 1rem;
  max-width: 980px;
}

.game-state-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.game-state-bar div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(216, 222, 230, 0.06);
}

.state-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.game-state-bar strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.3rem;
  line-height: 1;
}

.pitch-review-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    radial-gradient(circle at top left, rgba(95, 168, 211, 0.14), transparent 34%),
    rgba(7, 12, 18, 0.82);
}

.pitch-review-card strong {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.pitch-review-card p {
  color: var(--muted);
  margin: 0.3rem 0 0;
}

.pitch-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.pitch-review-actions .ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.primary-btn:disabled,
.ghost-btn:disabled,
.zone-cell:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.zone-cell.is-selected:disabled {
  opacity: 1;
}

.at-bat-card {
  display: grid;
  grid-template-columns: minmax(8rem, 0.28fr) 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(95, 168, 211, 0.12), rgba(216, 222, 230, 0.06)),
    rgba(7, 12, 18, 0.74);
}

.at-bat-card strong {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.3rem;
  line-height: 1;
}

.at-bat-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.at-bat-button {
  display: grid;
  gap: 0.18rem;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(216, 222, 230, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0.65rem 0.9rem;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.at-bat-button:hover,
.at-bat-button.is-selected {
  background: rgba(95, 168, 211, 0.92);
  border-color: rgba(95, 168, 211, 0.92);
  color: #ffffff;
  transform: translateY(-1px);
}

.at-bat-outcome {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.05;
  max-width: 7rem;
}

.at-bat-button:hover .at-bat-outcome,
.at-bat-button.is-selected .at-bat-outcome {
  color: #ffffff;
}

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

.notification-end-row,
.notification-end-row label {
  min-width: 0;
}

.notification-end-row {
  overflow: hidden;
}

.notification-end-row input {
  max-width: 100%;
  min-width: 0;
}

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

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

.position-selector {
  display: grid;
  gap: 0.55rem;
}

.field-label {
  color: var(--muted);
  font-weight: 700;
}

.optional-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.position-option {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(216, 222, 230, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  padding: 0.75rem 0.6rem;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.position-option:hover {
  background: rgba(95, 168, 211, 0.16);
  border-color: rgba(95, 168, 211, 0.55);
}

.position-option.is-selected,
.position-option[aria-pressed="true"] {
  background: #5fa8d3 !important;
  border-color: #5fa8d3 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.position-option.is-selected,
.position-option[aria-pressed="true"] {
  box-shadow: 0 0 0 3px rgba(95, 168, 211, 0.28);
}

.pitch-panel {
  background: var(--panel);
  border: 1px solid rgba(95, 168, 211, 0.22);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
  padding: 1.2rem;
  width: 100%;
}

.pitch-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pitch-panel-header h2 {
  margin-bottom: 0;
}

.pitch-count {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

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

.pitch-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.coach-pitch-table {
  min-width: 1180px;
}

.pitch-table th,
.pitch-table td {
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
  font-size: 0.92rem;
}

.pitch-table th {
  color: var(--ink);
  font-weight: 800;
}

.daily-schedule-panel {
  background:
    radial-gradient(circle at top left, rgba(95, 168, 211, 0.16), transparent 34%),
    rgba(7, 12, 18, 0.78);
}

.daily-schedule-header {
  align-items: end;
}

.week-picker {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 14rem);
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
}

.week-picker input,
.daily-editor textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 0.9rem;
  background: rgba(7, 12, 18, 0.92);
  color: var(--ink);
  font: inherit;
}

.daily-schedule-form {
  display: grid;
  gap: 1rem;
}

.calendar-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, rgba(2, 4, 7, 0.96), rgba(13, 22, 31, 0.9));
  box-shadow: inset 0 1px 0 rgba(216, 222, 230, 0.14);
}

.daily-schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.daily-card {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  height: 10rem;
  min-height: 10rem;
  padding: 1rem;
  border-right: 0;
  border-bottom: 1px solid rgba(22, 17, 15, 0.12);
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(16, 23, 31, 0.96), rgba(7, 12, 18, 0.92));
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 140ms ease, transform 140ms ease;
}

.daily-card:hover,
.daily-card:focus-visible {
  background:
    radial-gradient(circle at top left, rgba(95, 168, 211, 0.22), transparent 45%),
    linear-gradient(180deg, rgba(18, 28, 39, 1), rgba(8, 14, 21, 0.94));
  outline: none;
  transform: translateY(-1px);
}

.daily-card.has-plan {
  background:
    radial-gradient(circle at bottom right, rgba(95, 168, 211, 0.2), transparent 48%),
    linear-gradient(180deg, rgba(18, 28, 39, 1), rgba(8, 14, 21, 0.94));
}

.daily-card:last-child {
  border-bottom: 0;
}

.daily-card-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  justify-items: start;
}

.calendar-date-number {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1f5f84);
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
}

.daily-card h3 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.daily-card .eyebrow {
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.daily-card-plan {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  max-height: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  white-space: pre-wrap;
}

.daily-card.has-plan .daily-card-plan {
  color: var(--ink);
  font-weight: 700;
}

.daily-editor {
  width: min(92vw, 38rem);
  border: 0;
  border-radius: 1.5rem;
  padding: 0;
  background: transparent;
}

.daily-editor::backdrop {
  background: rgba(22, 17, 15, 0.56);
  backdrop-filter: blur(5px);
}

.daily-editor-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(95, 168, 211, 0.2), transparent 36%),
    rgba(10, 16, 23, 0.98);
  box-shadow: var(--shadow);
}

.daily-editor-card label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 800;
}

.daily-editor textarea {
  min-height: 13rem;
  resize: vertical;
}

.daily-editor-close {
  white-space: nowrap;
}

.game-row {
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.game-row:hover {
  background: rgba(95, 168, 211, 0.12);
}

.is-selected-row {
  background: rgba(95, 168, 211, 0.16);
}

.table-action-button {
  border: 1px solid rgba(95, 168, 211, 0.64);
  border-radius: 0.8rem;
  background: rgba(95, 168, 211, 0.9);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  min-width: 6.5rem;
  padding: 0.58rem 0.8rem;
  white-space: nowrap;
}

.actions-cell {
  min-width: 15rem;
}

.coach-dashboard-wrap {
  border-radius: 1.25rem;
}

.coach-dashboard-table th,
.coach-dashboard-table td {
  vertical-align: top;
}

.coach-dashboard-table th:first-child,
.coach-dashboard-table td:first-child {
  min-width: 13rem;
}

.coach-account-cell,
.coach-detail-stack {
  display: grid;
  gap: 0.35rem;
}

.coach-account-cell strong {
  color: var(--paper);
  font-size: 1rem;
}

.coach-account-cell span,
.coach-detail-stack span {
  color: var(--muted);
  font-size: 0.86rem;
}

.coach-detail-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 16rem;
}

.coach-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.coach-assignment-select {
  width: min(15rem, 100%);
  border: 1px solid rgba(95, 168, 211, 0.35);
  border-radius: 0.8rem;
  background: rgba(4, 10, 14, 0.82);
  color: var(--paper);
  font: inherit;
  padding: 0.58rem 0.8rem;
}

.coach-status-stack {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  min-width: 10rem;
}

.coach-role-text {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activate-action-button {
  background: #5fa8d3;
  border-color: #5fa8d3;
  color: #ffffff;
}

.secondary-action-button {
  background: rgba(19, 35, 29, 0.08);
  border-color: rgba(19, 35, 29, 0.18);
  color: var(--ink);
}

.secondary-action-button:hover {
  background: var(--bg-deep);
  color: #ffffff;
}

.danger-action-button {
  border-color: rgba(153, 27, 27, 0.8);
  background: rgba(153, 27, 27, 0.92);
}

.danger-action-button:hover {
  background: rgb(127, 29, 29);
}

.table-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.muted-table-text {
  color: var(--muted);
  font-weight: 800;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  min-width: 5.6rem;
  padding: 0.48rem 0.7rem;
  text-transform: uppercase;
}

.coach-pill {
  background: rgba(95, 168, 211, 0.14);
  color: var(--accent);
}

.owner-pill {
  background: rgba(216, 222, 230, 0.14);
  color: var(--silver);
}

.zone-field {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
}

.zone-field legend {
  padding: 0 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.zone-decision-layout {
  display: grid;
  grid-template-columns: minmax(0, 24rem) minmax(14rem, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.strike-zone-scene {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  max-width: 24rem;
  padding: 1.2rem 1.2rem 0.5rem;
  border-radius: 1.1rem;
  background:
    radial-gradient(ellipse at center 95%, rgba(95, 168, 211, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(15, 26, 37, 0.92), rgba(7, 12, 18, 0.76)),
    repeating-linear-gradient(90deg, rgba(216, 222, 230, 0.05) 0 1px, transparent 1px 16px);
  border: 1px solid var(--line);
}

.zone-backstop {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 24rem);
  padding: 1.2rem 1rem 1.4rem;
  border-radius: 1rem 1rem 0.4rem 0.4rem;
  background:
    linear-gradient(180deg, rgba(22, 17, 15, 0.08), rgba(22, 17, 15, 0.02)),
    linear-gradient(90deg, transparent 0 14%, rgba(255, 255, 255, 0.45) 14% 15%, transparent 15% 85%, rgba(255, 255, 255, 0.45) 85% 86%, transparent 86%);
}

.pitch-location-map {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  width: min(100%, 21rem);
}

.ball-zone-row {
  width: min(100%, 13rem);
}

.middle-zone-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 13rem) 3.2rem;
  gap: 0.45rem;
  align-items: stretch;
  width: 100%;
}

.ball-zone-column {
  display: flex;
}

.strike-zone {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  aspect-ratio: 0.78 / 1;
  width: min(100%, 13rem);
  border: 5px solid #d8dee6;
  background:
    linear-gradient(180deg, rgba(216, 222, 230, 0.22), rgba(95, 168, 211, 0.1));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 14px 34px rgba(0, 0, 0, 0.34);
}

.strike-zone::before {
  content: "";
  position: absolute;
  inset: -0.55rem;
  border: 2px solid rgba(22, 17, 15, 0.25);
  pointer-events: none;
}

.zone-cell {
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 222, 230, 0.38);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  min-width: 0;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.zone-cell span {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: rgba(7, 12, 18, 0.72);
  border: 1px solid rgba(216, 222, 230, 0.2);
}

.zone-cell:hover,
.zone-cell.is-selected {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 55%),
    rgba(95, 168, 211, 0.94);
  color: #fff;
}

.zone-cell.is-selected {
  box-shadow: inset 0 0 0 3px var(--bg-deep);
}

.zone-cell:hover span,
.zone-cell.is-selected span {
  background: rgba(22, 17, 15, 0.92);
  border-color: rgba(255, 248, 239, 0.32);
}

.ball-zone {
  min-height: 3.2rem;
  width: 100%;
  border: 1px dashed rgba(216, 222, 230, 0.32);
  border-radius: 0.65rem;
  background: rgba(216, 222, 230, 0.06);
}

.ball-zone span {
  width: 0.7rem;
  height: 0.7rem;
  background: rgba(22, 17, 15, 0.18);
  border-color: transparent;
}

.ball-zone:hover,
.ball-zone.is-selected {
  border-style: solid;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 56%),
    rgba(95, 168, 211, 0.82);
}

.home-plate {
  position: relative;
  width: 7.4rem;
  height: 5.1rem;
  margin-top: -0.15rem;
  background: #d8dee6;
  clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.24));
}

.home-plate::after {
  content: "";
  position: absolute;
  inset: 0.22rem;
  background: #fffaf2;
  clip-path: inherit;
}

.decision-result-card {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top right, rgba(95, 168, 211, 0.14), transparent 38%),
    rgba(7, 12, 18, 0.76);
}

.decision-result-option {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(216, 222, 230, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.2;
  padding: 0.8rem 0.9rem;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.decision-result-option:hover,
.decision-result-option.is-selected {
  background: #5fa8d3;
  border-color: #5fa8d3;
  color: #ffffff;
  transform: translateY(-1px);
}

.decision-result-option.is-selected {
  box-shadow: 0 0 0 3px rgba(95, 168, 211, 0.24);
}

.decision-result-option:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.zone-label {
  position: absolute;
  color: rgba(22, 17, 15, 0.66);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zone-label-top {
  top: 0.55rem;
}

.zone-label-bottom {
  bottom: 0.45rem;
}

.zone-label-left {
  left: 0.45rem;
  top: 50%;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left center;
}

.zone-label-right {
  right: 0.45rem;
  top: 50%;
  transform: rotate(90deg) translateX(-50%);
  transform-origin: right center;
}

.zone-selected {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-notes p {
  margin-bottom: 0.7rem;
}

.callout {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(216, 222, 230, 0.06);
  border: 1px solid var(--line);
}

.panel-label-dark {
  color: var(--accent);
}

.activation-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(95, 168, 211, 0.24);
  background:
    radial-gradient(circle at top right, rgba(95, 168, 211, 0.18), transparent 42%),
    rgba(8, 13, 19, 0.84);
}

.activation-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(216, 222, 230, 0.1);
}

.activation-card .primary-btn {
  margin-top: 0.3rem;
}

.price-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 0.95;
  margin-bottom: 0.8rem;
}

.feature-list {
  margin: 0 0 1.2rem;
  padding: 0;
  color: var(--muted);
  line-height: 1.7;
  list-style: none;
}

.activation-card .feature-list {
  display: grid;
  gap: 0.65rem;
}

.activation-card .feature-list li {
  position: relative;
  padding-left: 1.7rem;
}

.activation-card .feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

.wide-btn {
  width: 100%;
}

.microcopy {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.inline-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.auth-form,
.account-panel {
  gap: 1rem;
}

.form-message {
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
}

.form-message.is-error {
  color: #a11d1d;
}

.account-row {
  margin-bottom: 0.5rem;
}

.compact-actions {
  margin-top: 1rem;
  margin-bottom: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .contact,
  .pitch-layout,
  .profile-advanced-stats,
  .profile-stats-grid,
  .scouting-layout,
  .library-category-grid,
  .program-grid,
  .feature-grid,
  .roadmap-grid,
  .roadmap-grid-wide,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }

  .form-row,
  .form-row-three,
  .form-row-four,
  .notification-end-row,
  .game-state-bar,
  .at-bat-card,
  .pitch-review-card,
  .zone-decision-layout,
  .daily-schedule-header {
    grid-template-columns: 1fr;
  }

  .scouting-sidebar {
    position: static;
  }

  .at-bat-selector,
  .pitch-review-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 7rem;
  }

  body {
    background:
      radial-gradient(circle at 18% 0%, rgba(95, 168, 211, 0.2), transparent 34%),
      linear-gradient(180deg, #010203 0%, #071019 50%, #020305 100%);
  }

  body[data-user-role="coach"] {
    background:
      radial-gradient(circle at 18% 0%, rgba(95, 168, 211, 0.2), transparent 34%),
      linear-gradient(180deg, #010203 0%, #071019 50%, #020305 100%);
  }

  .site-header,
  .hero,
  .section {
    width: min(100% - 0.75rem, 1160px);
  }

  .site-header {
    padding-top: 0.45rem;
  }

  .hero {
    padding: 0.75rem 0 2.5rem;
  }

  .section {
    padding: 1rem 0 1.75rem;
  }

  .page-hero {
    padding-top: 1rem;
  }

  .topbar {
    gap: 0.7rem;
    padding: 0.65rem;
    border-radius: 1.05rem;
  }

  .brand {
    gap: 0.55rem;
    min-width: 0;
    width: min(74vw, 20rem);
    min-height: 3.5rem;
  }

  .brand-mark {
    display: none;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 0.38rem;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-tab,
  .nav-cta,
  .primary-btn,
  .ghost-btn {
    min-height: 2.65rem;
    padding: 0.72rem 0.9rem;
    white-space: nowrap;
  }

  .nav-tab {
    flex: 0 0 auto;
    font-size: 0.86rem;
  }

  .hero-copy,
  .card-panel,
  .program-card,
  .roadmap-item,
  .contact-card,
  .pitch-panel {
    border-radius: 1.4rem;
    padding: 1rem;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.2rem);
  }

  h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  h3 {
    font-size: 1.45rem;
  }

  .page-title {
    font-size: clamp(2.8rem, 16vw, 4rem);
  }

  .hero-grid,
  .split,
  .feature-grid,
  .program-grid,
  .roadmap-grid,
  .roadmap-grid-wide {
    gap: 0.85rem;
  }

  .hero-actions {
    display: grid;
    gap: 0.65rem;
  }

  .hero-stats {
    gap: 0.6rem;
  }

  .hero-stats li {
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(216, 222, 230, 0.06);
  }

  .track {
    padding: 0.8rem 0;
  }

  .pitch-panel-header,
  .library-category-heading,
  .stat-card-header {
    display: grid;
    gap: 0.5rem;
  }

  .pitch-count,
  .library-category-heading span {
    white-space: normal;
  }

  .stat-helper {
    max-width: none;
  }

  .contact-card input,
  .contact-card textarea,
  .contact-card select,
  .week-picker input,
  .daily-editor textarea {
    font-size: 16px;
    min-height: 2.9rem;
  }

  .week-picker {
    width: 100%;
  }

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

  .profile-zone-cell {
    min-height: 4.8rem;
    font-size: 1.9rem;
  }

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

  .position-option,
  .at-bat-button,
  .decision-result-option,
  .table-action-button {
    min-height: 2.75rem;
  }

  .game-state-bar {
    gap: 0.55rem;
  }

  .game-state-bar div,
  .at-bat-card,
  .pitch-review-card {
    padding: 0.85rem;
  }

  .at-bat-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .at-bat-button {
    width: 100%;
    padding: 0.62rem 0.5rem;
  }

  .pitch-review-actions,
  .coach-action-group,
  .compact-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .coach-detail-stack {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .coach-dashboard-table th:first-child,
  .coach-dashboard-table td:first-child {
    min-width: 11rem;
  }

  .pitch-review-actions .primary-btn,
  .pitch-review-actions .ghost-btn,
  .coach-action-group .table-action-button,
  .compact-actions .primary-btn,
  .compact-actions .ghost-btn {
    width: 100%;
  }

  .pitch-table-wrap {
    margin: 0 -0.2rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(7, 12, 18, 0.66);
    -webkit-overflow-scrolling: touch;
  }

  .pitch-table {
    min-width: 560px;
  }

  .coach-pitch-table {
    min-width: 980px;
  }

  .pitch-table th,
  .pitch-table td {
    padding: 0.68rem 0.55rem;
    font-size: 0.86rem;
  }

  .calendar-frame {
    border-radius: 1rem;
  }

  .daily-card {
    height: 8.6rem;
    min-height: 8.6rem;
    padding: 0.85rem;
  }

  .daily-editor {
    width: min(96vw, 38rem);
  }

  .daily-editor-card {
    padding: 1rem;
    max-height: 86vh;
    overflow-y: auto;
  }

  .zone-field {
    padding: 0.75rem;
  }

  .zone-decision-layout {
    gap: 0.75rem;
  }

  .strike-zone-scene {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.45rem 0.35rem;
  }

  .zone-backstop {
    padding: 0.8rem 0.35rem 1rem;
  }

  .pitch-location-map {
    width: min(100%, 18rem);
    gap: 0.35rem;
  }

  .ball-zone-row,
  .strike-zone {
    width: min(100%, 11rem);
  }

  .middle-zone-row {
    grid-template-columns: 2.6rem minmax(0, 11rem) 2.6rem;
    gap: 0.35rem;
    justify-content: center;
  }

  .ball-zone {
    min-height: 2.75rem;
  }

  .strike-zone {
    border-width: 4px;
  }

  .zone-cell span {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.82rem;
  }

  .home-plate {
    width: 5.8rem;
    height: 4rem;
  }

  .decision-result-card {
    padding: 0.85rem;
  }

  .library-toolbar {
    justify-content: stretch;
  }

  .library-toolbar label,
  .library-form {
    width: 100%;
    min-width: 0;
  }

  .library-entry-header {
    display: grid;
  }

  .scouting-team-header,
  .pitcher-card-header {
    display: grid;
  }

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

  .scouting-team-header .coach-action-group,
  .pitcher-card-header .table-action-button {
    width: 100%;
  }

  .notification-card-header {
    display: grid;
    align-items: start;
  }

  .notification-card-header .table-action-button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .middle-zone-row {
    grid-template-columns: 2.35rem minmax(0, 10rem) 2.35rem;
  }

  .ball-zone-row,
  .strike-zone {
    width: min(100%, 10rem);
  }

  .nav-tab {
    font-size: 0.82rem;
    padding-inline: 0.72rem;
  }

  .at-bat-selector,
  .position-grid,
  .count-performance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body:has(#player-gameday-view) .page-main {
    padding-bottom: 1.25rem;
  }

  body:has(#player-gameday-view) .page-hero {
    padding-top: 0.75rem;
  }

  body:has(#player-gameday-view) .section-heading {
    margin-bottom: 0.75rem;
  }

  body:has(#player-gameday-view) .page-title {
    margin-bottom: 0.45rem;
  }

  body:has(#player-gameday-view) .hero-text {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  #player-gameday-view {
    gap: 0.9rem;
  }

  #pitch-form {
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 1.25rem;
  }

  #pitch-form > label,
  #pitch-form .form-row,
  #pitch-form .zone-field,
  #pitch-form .at-bat-card,
  #pitch-form .game-state-bar,
  #pitch-form .pitch-review-card {
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(216, 222, 230, 0.06);
  }

  #pitch-form .form-row {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
    overflow: hidden;
  }

  #pitch-form .form-row label {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
    overflow: hidden;
  }

  #pitch-form select,
  #pitch-form input,
  #pitch-form textarea {
    min-width: 0;
    max-width: 100%;
    border-radius: 0.85rem;
  }

  #pitch-form input[type="date"],
  #pitch-form input[type="week"],
  .notification-end-row input[type="date"],
  .notification-end-row input[type="time"],
  .week-picker input[type="week"],
  input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    width: -webkit-fill-available;
    inline-size: 100%;
    max-inline-size: 100%;
    text-align: center;
  }

  #pitch-form > label:has(input[name="atBatCount"]) {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 1fr 6rem;
    align-items: center;
  }

  #pitch-form input[name="atBatCount"] {
    text-align: center;
    font-weight: 900;
  }

  #pitch-form .at-bat-card {
    display: grid;
    gap: 0.7rem;
  }

  #pitch-form .at-bat-card strong {
    font-size: 2rem;
  }

  #pitch-form .at-bat-selector {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #pitch-form .at-bat-selector::-webkit-scrollbar {
    display: none;
  }

  #pitch-form .at-bat-button {
    flex: 0 0 4.9rem;
    min-height: 3.25rem;
  }

  #pitch-form .game-state-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    overflow: hidden;
  }

  #pitch-form .game-state-bar div {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.85rem;
  }

  #pitch-form .game-state-bar div + div {
    border-left: 1px solid rgba(216, 222, 230, 0.12);
  }

  #pitch-form .game-state-bar strong {
    font-size: 2.1rem;
  }

  #pitch-form .pitch-review-card {
    display: grid;
    gap: 0.8rem;
    background:
      radial-gradient(circle at top left, rgba(95, 168, 211, 0.12), transparent 42%),
      rgba(7, 12, 18, 0.7);
  }

  #pitch-form .pitch-review-card strong {
    font-size: 1.65rem;
  }

  #pitch-form .pitch-review-card p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  #pitch-form .pitch-review-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  #pitch-form .pitch-review-actions .ghost-btn {
    min-height: 2.8rem;
    padding-inline: 0.55rem;
    white-space: normal;
  }

  #pitch-form .zone-field {
    padding: 0.8rem 0.55rem 0.7rem;
  }

  #pitch-form .zone-field legend {
    font-weight: 900;
  }

  #pitch-form .zone-decision-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  #pitch-form .strike-zone-scene {
    margin: 0 auto;
    max-width: 19rem;
    padding: 0.7rem 0.25rem 0.25rem;
    border-radius: 1rem;
  }

  #pitch-form .zone-backstop {
    width: 100%;
    padding: 0.65rem 0.25rem 0.9rem;
  }

  #pitch-form .pitch-location-map {
    width: min(100%, 17.5rem);
  }

  #pitch-form .middle-zone-row {
    grid-template-columns: 2.75rem minmax(0, 10.75rem) 2.75rem;
    gap: 0.35rem;
  }

  #pitch-form .ball-zone-row,
  #pitch-form .strike-zone {
    width: min(100%, 10.75rem);
  }

  #pitch-form .ball-zone {
    min-height: 2.8rem;
    border-radius: 0.75rem;
  }

  #pitch-form .strike-zone {
    border-width: 4px;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.16),
      0 10px 24px rgba(0, 0, 0, 0.34);
  }

  #pitch-form .strike-zone::before {
    inset: -0.35rem;
  }

  #pitch-form .zone-cell span {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.78rem;
  }

  #pitch-form .home-plate {
    width: 5.4rem;
    height: 3.65rem;
  }

  #pitch-form .zone-selected {
    margin: 0.45rem 0 0;
    text-align: center;
    font-size: 0.86rem;
  }

  #pitch-form .decision-result-card {
    padding: 0.75rem;
  }

  #pitch-form .decision-result-card .eyebrow {
    margin-bottom: 0.1rem;
  }

  #pitch-form .decision-result-option {
    min-height: 3rem;
    padding: 0.7rem;
    font-size: 0.86rem;
  }

  #pitch-form .compact-actions {
    position: sticky;
    bottom: 0.4rem;
    z-index: 4;
    display: grid;
    gap: 0.55rem;
    padding: 0.65rem;
    border: 1px solid rgba(95, 168, 211, 0.34);
    border-radius: 1rem;
    background: rgba(3, 6, 10, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  }

  #player-gameday-view > .pitch-panel {
    padding: 0.9rem;
    border-radius: 1.25rem;
  }

  #player-gameday-view > .pitch-panel .pitch-panel-header {
    margin-bottom: 0.75rem;
  }

  #player-gameday-view > .pitch-panel .pitch-table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  #player-gameday-view > .pitch-panel .pitch-table,
  #player-gameday-view > .pitch-panel .pitch-table thead,
  #player-gameday-view > .pitch-panel .pitch-table tbody,
  #player-gameday-view > .pitch-panel .pitch-table tr,
  #player-gameday-view > .pitch-panel .pitch-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  #player-gameday-view > .pitch-panel .pitch-table thead {
    display: none;
  }

  #player-gameday-view > .pitch-panel .pitch-table tr {
    margin-bottom: 0.7rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(7, 12, 18, 0.78);
  }

  #player-gameday-view > .pitch-panel .pitch-table tr:last-child {
    margin-bottom: 0;
  }

  #player-gameday-view > .pitch-panel .pitch-table td {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid rgba(216, 222, 230, 0.12);
    color: var(--ink);
    font-size: 0.9rem;
  }

  #player-gameday-view > .pitch-panel .pitch-table td:last-child {
    border-bottom: 0;
  }

  #player-gameday-view > .pitch-panel .pitch-table td[colspan] {
    display: block;
    color: var(--muted);
    text-align: center;
  }

  #player-gameday-view > .pitch-panel .pitch-table td[colspan]::before {
    content: none;
  }

  #player-gameday-view > .pitch-panel .pitch-table td:nth-child(1)::before {
    content: "Date";
  }

  #player-gameday-view > .pitch-panel .pitch-table td:nth-child(2)::before {
    content: "Opp";
  }

  #player-gameday-view > .pitch-panel .pitch-table td:nth-child(3)::before {
    content: "At-Bats";
  }

  #player-gameday-view > .pitch-panel .pitch-table td:nth-child(4)::before {
    content: "Pitches";
  }

  #player-gameday-view > .pitch-panel .pitch-table td:nth-child(5)::before {
    content: "Open";
  }

  #player-gameday-view > .pitch-panel .pitch-table td:nth-child(6)::before {
    content: "Delete";
  }

  #player-gameday-view > .pitch-panel .pitch-table td::before {
    color: var(--muted);
    font-weight: 900;
  }

  #player-gameday-view > .pitch-panel .table-action-button {
    min-width: 7.25rem;
  }
}

@media (max-width: 390px) {
  #pitch-form .middle-zone-row {
    grid-template-columns: 2.35rem minmax(0, 9.8rem) 2.35rem;
  }

  #pitch-form .ball-zone-row,
  #pitch-form .strike-zone {
    width: min(100%, 9.8rem);
  }

  #pitch-form .decision-result-option {
    font-size: 0.82rem;
  }
}

.camp-page .page-hero {
  align-items: start;
}

.camp-registration-form {
  display: grid;
  gap: 1rem;
}

.camp-form-header {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.camp-form-header h2 {
  margin: 0;
}

.camp-registration-form textarea {
  resize: vertical;
}

.camp-terms-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(95, 168, 211, 0.28);
  border-radius: 1rem;
  background: rgba(4, 9, 14, 0.72);
}

.camp-terms-panel {
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
}

.camp-terms-panel h3,
.camp-terms-panel h4 {
  margin: 0.85rem 0 0.35rem;
  color: var(--ink);
}

.camp-terms-panel h3:first-child {
  margin-top: 0;
}

.camp-terms-panel p {
  margin: 0 0 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

.camp-terms-panel p:last-child {
  margin-bottom: 0;
}

.camp-terms-close {
  margin-top: 0.85rem;
}

.signature-field {
  padding: 1rem;
  border: 1px solid rgba(95, 168, 211, 0.28);
  border-radius: 1rem;
  background: rgba(4, 9, 14, 0.62);
}

.signature-field input {
  margin-top: 0.45rem;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.45rem, 5vw, 2.2rem);
  letter-spacing: 0.05em;
}

.camp-session-field {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(95, 168, 211, 0.28);
  border-radius: 1rem;
  background: rgba(4, 9, 14, 0.62);
}

.camp-session-field legend {
  padding: 0 0.35rem;
  color: var(--ink);
  font-weight: 900;
}

.session-choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.session-choice-card input {
  width: 1.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  margin: 0.18rem 0 0;
  accent-color: var(--accent);
}

.session-choice-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.session-choice-card small {
  color: var(--accent);
  font-weight: 900;
}

.session-choice-card:has(input:checked) {
  border-color: rgba(95, 168, 211, 0.72);
  background: rgba(95, 168, 211, 0.13);
}

.camp-registration-list {
  display: grid;
  gap: 1rem;
}

.camp-admin-card {
  display: grid;
  gap: 1rem;
}

.camp-admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.camp-admin-card-header h3 {
  margin: 0;
}

.camp-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

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

.camp-admin-detail {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.035);
}

.camp-admin-detail span,
.camp-admin-notes span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.camp-admin-detail strong {
  overflow-wrap: anywhere;
}

.camp-admin-notes {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.035);
}

.camp-admin-notes p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
}

.checkbox-field input {
  width: 1.2rem;
  min-width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  accent-color: var(--accent);
}

.checkbox-field input:disabled + span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .camp-registration-form .form-row {
    grid-template-columns: 1fr;
  }

  .camp-registration-form input,
  .camp-registration-form textarea {
    width: 100%;
    max-width: 100%;
  }

  .camp-admin-card-header,
  .camp-admin-grid {
    grid-template-columns: 1fr;
  }

  .camp-admin-card-header {
    display: grid;
  }
}

[hidden] {
  display: none !important;
}

.active-only {
  display: none !important;
}

body[data-user-status="active"] .active-only {
  display: inline-flex !important;
}

body[data-user-status="active"] .pending-only {
  display: none !important;
}
