:root {
  --navy: #071a33;
  --blue: #12396a;
  --gold: #b48646;
  --copper: #9a5b2d;
  --paper: #f7f5ef;
  --ink: #172033;
  --muted: #657086;
  --line: #d8dce5;
  --surface: #ffffff;
  --success: #1d7d5b;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Events share the hub's navy, gold, and paper palette. */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.event-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px #071a3308; }
.event-card h3 { margin: 8px 0; font-size: 1.35rem; overflow-wrap: anywhere; }
.event-card .pill-row { margin: 0 0 20px; }
.event-card .eyebrow { margin-bottom: 6px; }
.event-card-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.event-metric { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.event-metric span, .event-metric small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.event-metric strong { display: block; margin: 7px 0; color: var(--navy); font-size: clamp(1.1rem, 2vw, 1.6rem); overflow-wrap: anywhere; }
.event-metric small { font-size: .75rem; }
.event-metric-highlight { background: #edf6f1; border-color: #b9d9c9; }
.event-negative, .event-metric strong.event-negative { color: #b42318; }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.event-actions button { min-height: 42px; }
.event-empty { grid-column: 1 / -1; padding: 36px; }
#eventDialog { width: min(1180px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 12px; background: var(--paper); }
#eventForm { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.event-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; color: white; background: var(--navy); }
.event-dialog-header h2 { margin: 4px 0 0; font-size: 1.4rem; overflow-wrap: anywhere; }
.event-dialog-header .eyebrow { margin: 0; color: #d7b989; }
.event-dialog-header .ghost-button { color: white; background: #ffffff12; border-color: #ffffff44; }
.event-tabs { display: flex; gap: 4px; flex-shrink: 0; padding: 8px 20px; overflow-x: auto; background: white; border-bottom: 1px solid var(--line); }
.event-tabs button { flex-shrink: 0; padding: 12px 14px; min-height: 44px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-weight: 700; }
.event-tabs button.active { color: var(--navy); background: #b4864629; box-shadow: inset 0 -3px var(--gold); }
#eventEditor { min-height: 0; overflow-y: auto; padding: 20px; overscroll-behavior: contain; }
.event-panel { padding: 22px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.event-panel:last-child { margin-bottom: 0; }
.event-panel h3 { margin: 0 0 12px; }
.event-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.event-form-grid label, .event-add-bar label { min-width: 0; }
.event-form-grid input, .event-form-grid select { width: 100%; min-width: 0; }
.event-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.event-dialog-footer { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 24px; border-top: 1px solid var(--line); background: white; }
.event-dialog-footer .form-message { margin: 0; }
.event-dialog-footer .error { color: #b42318; }
.event-dialog-footer .event-actions { flex-shrink: 0; }
.event-team-list, .event-records { display: grid; gap: 14px; margin-top: 18px; }
.event-team-row, .event-person { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fdfdfb; }
.event-checkbox { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; }
.event-checkbox input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.event-checkbox small, .event-available-row small, .event-person small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }
.event-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.event-row-heading h4 { margin: 0 0 8px; font-size: 1.05rem; overflow-wrap: anywhere; }
.event-row-heading h3 { margin-bottom: 0; }
.event-balance { text-align: right; flex-shrink: 0; font-size: .85rem; color: var(--muted); }
.event-balance strong { display: block; margin-top: 5px; color: var(--navy); }
.event-picker { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fa; }
.event-picker summary { cursor: pointer; padding: 6px; color: var(--blue); font-weight: 700; }
.event-available { max-height: 330px; overflow-y: auto; }
.event-available-row { display: grid; grid-template-columns: 1fr 160px auto; gap: 15px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.event-add-bar { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; margin: 18px 0; }
.event-payment-dialog { width: min(480px, calc(100% - 24px)); }
@media (max-width: 800px) {
  .event-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-add-bar { grid-template-columns: 1fr 1fr; }
  .event-add-bar button { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  #eventDialog { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  #eventForm { max-height: 100dvh; height: 100%; }
  .event-dialog-header { padding: 16px; }
  .event-dialog-header h2 { font-size: 1.15rem; }
  .event-tabs { padding: 6px; }
  #eventEditor { padding: 10px; flex: 1; }
  .event-panel { padding: 14px; }
  .event-form-grid { grid-template-columns: 1fr; }
  .event-dialog-footer { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  .event-dialog-footer .event-actions { justify-content: flex-end; }
  .event-available-row { grid-template-columns: 1fr auto; }
  .event-available-row > div { grid-column: 1 / -1; }
  .event-row-heading { align-items: flex-start; }
  .event-person { padding: 12px; }
  .event-filters { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

.install-banner {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  display: flex;
  max-width: 560px;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid rgba(180, 134, 70, 0.48);
  border-radius: 8px;
  color: #fff;
  background: #071a33;
  box-shadow: 0 18px 54px rgba(7, 26, 51, 0.28);
}

.install-banner[hidden] {
  display: none;
}

.install-banner div {
  display: flex;
  gap: 8px;
}

.auth-view {
  display: grid;
  min-height: calc(100vh - 360px);
  place-items: center;
  padding: 32px 18px;
}

.auth-card {
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

.auth-card img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 50%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, #061326, #0b2445 56%, #111827);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-footer {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  gap: 10px;
}

#versionBadge {
  color: #c6d4e7;
  font-size: 0.86rem;
  font-weight: 800;
}

.sidebar-footer .ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.brand-mark {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--navy);
}

.brand-mark small {
  display: block;
  margin-top: 2px;
  color: #c6d4e7;
}

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

.nav-section {
  display: grid;
  gap: 6px;
}

.nav-section > span,
.mobile-nav-group > span {
  color: #91a4bf;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-button,
.mobile-button {
  border: 0;
  background: transparent;
}

.nav-button {
  min-height: 44px;
  padding: 10px 14px;
  color: #dbe7f6;
  text-align: left;
  border-radius: 6px;
}

.nav-button.active,
.nav-button:hover {
  color: #fff;
  background: rgba(180, 134, 70, 0.2);
}

main {
  min-width: 0;
  padding-bottom: 52px;
}

.hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #071a33;
}

.hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 26, 51, 0.88), rgba(7, 26, 51, 0.18) 64%, rgba(7, 26, 51, 0.72));
}

.hero-copy {
  position: absolute;
  z-index: 1;
  left: clamp(24px, 5vw, 68px);
  bottom: 34px;
  max-width: 660px;
  color: #fff;
}

.hero-logo {
  width: clamp(74px, 12vw, 132px);
  height: clamp(74px, 12vw, 132px);
  object-fit: cover;
  border: 3px solid rgba(180, 134, 70, 0.9);
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  margin-bottom: 14px;
}

.hero-copy p,
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.session-line {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #e9edf3;
  background: rgba(7, 26, 51, 0.52);
  font-size: 0.86rem;
  font-weight: 800;
}

.view {
  display: none;
  padding: 28px clamp(18px, 4vw, 44px);
}

.view.active {
  display: block;
}

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

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

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
}

.primary-action,
.ghost-button {
  min-height: 42px;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-action {
  border: 1px solid #8a642e;
  color: #fff;
  background: linear-gradient(180deg, #bd8c49, #825424);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.wide {
  width: 100%;
}

.stats-grid,
.dashboard-grid,
.doc-grid,
.coach-grid {
  display: grid;
  gap: 14px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.status-strip {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(180, 134, 70, 0.34);
  border-radius: 8px;
  background: #fffaf0;
}

.refresh-button {
  margin-bottom: 14px;
}

.stat,
.panel,
.player-detail,
.player-card,
.doc-card,
.coach-card,
.muted-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
}

.stat {
  padding: 16px;
}

.stat strong {
  display: block;
  font-size: 2rem;
}

.stat span,
.meta,
.muted,
label span {
  color: var(--muted);
}

.panel,
.player-detail,
.muted-block {
  padding: 18px;
}

.breakdown {
  display: grid;
  gap: 10px;
}

.team-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.dashboard-list {
  display: grid;
  gap: 10px;
}

.watch-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.watch-row strong {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-size: 1.2rem;
}

.watch-row span {
  color: #334155;
  font-weight: 850;
}

.bar {
  height: 10px;
  overflow: hidden;
  background: #e9edf3;
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.toolbar,
.compact-form {
  display: grid;
  grid-template-columns: 220px minmax(220px, 1fr) repeat(4, auto);
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.toolbar {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.export-toolbar {
  grid-template-columns: repeat(3, auto);
  justify-content: start;
}

.toolbar button {
  min-height: 42px;
  align-self: end;
}

.import-box {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
}

.import-box summary {
  min-height: 46px;
  padding: 12px 16px;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.import-box .stack-form {
  padding: 0 16px 16px;
}

.bulk-roster-box {
  overflow: hidden;
}

.bulk-roster-table {
  overflow: auto;
  max-height: 62vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bulk-roster-grid {
  display: grid;
  min-width: max-content;
  grid-template-columns: minmax(180px, 260px) repeat(var(--team-count), minmax(104px, 124px));
}

.bulk-roster-header,
.bulk-roster-player,
.bulk-roster-check {
  min-height: 48px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bulk-roster-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--navy);
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.bulk-roster-player {
  position: sticky;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px 10px;
  background: #fff;
}

.bulk-roster-header.bulk-roster-player {
  z-index: 3;
  background: #f8fafc;
}

.bulk-roster-player strong,
.bulk-roster-player span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-roster-player span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.bulk-roster-check {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 8px;
}

.bulk-roster-check input {
  width: 20px;
  height: 20px;
}

.bulk-roster-check span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.missing-info-panel {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

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

.missing-tile {
  display: grid;
  gap: 4px;
  min-height: 76px;
  justify-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.missing-tile strong {
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1;
}

.missing-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.missing-player-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.missing-player-row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.missing-player-row:last-child {
  border-bottom: 0;
}

.missing-player-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.bulk-update-grid {
  grid-template-columns: minmax(140px, 180px) minmax(180px, 1fr);
  align-items: center;
}

.bulk-update-grid legend {
  grid-column: 1 / -1;
}

.bulk-update-grid label {
  min-height: 42px;
}

.print-roster-sheet {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.checkbox-group {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkbox-group legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.checkbox-group label {
  display: flex;
  min-height: auto;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: none;
}

.checkbox-group input {
  width: auto;
}

.players-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.player-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.player-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.player-card + .player-card {
  border-top: 1px solid var(--line);
}

.player-row {
  display: grid;
  grid-template-columns: 38px 34px minmax(150px, 2fr) minmax(100px, 1.3fr) minmax(65px, .6fr) 76px 20px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.player-row:hover,
.player-card.active > .player-row {
  background: #f4f1e9;
}

.player-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -3px;
}

.player-row .record-headshot.small {
  width: 38px;
  height: 38px;
}

.player-row .player-number {
  min-width: 0;
  width: 34px;
  height: 34px;
  font-size: .85rem;
}

.player-row-name,
.player-row-team {
  min-width: 0;
  overflow-wrap: anywhere;
}

.player-row-team,
.player-row-position,
.player-row-grade {
  color: var(--muted);
  font-size: .85rem;
}

.player-row-chevron {
  color: var(--blue);
  font-size: 1.2rem;
  text-align: center;
}

.player-card.active .player-row-chevron {
  transform: rotate(180deg);
}

.player-row-options {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #fbfcfe;
}

.player-detail-actions,
.player-tools-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.player-tools-content {
  padding: 0 14px 2px;
}

.player-tools-actions button {
  min-height: 40px;
}

.player-edit-profile {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.player-edit-photo-field {
  min-width: 0;
  flex: 1;
}

.player-edit-photo-field > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.player-edit-photo-field input {
  padding: 6px;
  font-size: .8rem;
}

.detail-top,
.dialog-title,
.card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.contact-link {
  color: var(--navy);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.record-headshot {
  flex: 0 0 auto;
  overflow: hidden;
  object-fit: cover;
  border: 2px solid rgba(180, 134, 70, 0.72);
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}

.record-headshot.small {
  width: 48px;
  height: 48px;
}

.record-headshot.medium {
  display: grid;
  width: 108px;
  height: 108px;
  margin-bottom: 12px;
  place-items: center;
}

.record-headshot.large {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
}

.record-headshot.placeholder {
  display: grid;
  place-items: center;
}

.player-number {
  display: grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-weight: 900;
}

.player-number.jersey-md-blue {
  color: var(--gold);
  background: var(--navy);
  border: 2px solid var(--gold);
}

.player-number.jersey-varsity {
  color: var(--gold);
  background: var(--navy);
  border: 2px solid var(--gold);
}

.player-number.jersey-md-gold {
  color: var(--blue);
  background: #fff;
  border: 2px solid var(--blue);
}

.player-number.jersey-jv {
  color: var(--blue);
  background: #fff;
  border: 2px solid var(--blue);
}

.player-number.jersey-md-white {
  color: var(--blue);
  background: var(--gold);
  border: 2px solid var(--blue);
}

.player-number.jersey-novice {
  color: var(--blue);
  background: var(--gold);
  border: 2px solid var(--blue);
}

.player-number.jersey-program-wide {
  color: #fff;
  background: #111827;
  border: 2px solid #fff;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 9px;
  color: #334155;
  background: #f8fafc;
  font-size: 0.84rem;
  font-weight: 800;
}

.detail-grid,
.report-grid {
  display: grid;
  gap: 12px;
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 18px 0;
}

.detail-item {
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.report-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.report-box strong {
  display: block;
  margin-bottom: 6px;
}

.doc-grid,
.coach-team-grid,
.plan-grid,
.eligibility-list,
.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.coach-grid {
  display: grid;
  gap: 18px;
}

.coach-team-section {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.team-section-title {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gold);
}

.team-section-title h3 {
  margin: 0;
}

.team-section-title span {
  display: grid;
  min-width: 34px;
  min-height: 28px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-weight: 900;
}

.coach-team-grid {
  display: grid;
  gap: 14px;
}

.doc-card,
.coach-card,
.plan-card,
.eligibility-card {
  padding: 16px;
}

.practice-form {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.plan-grid,
.eligibility-list {
  display: grid;
  gap: 14px;
}

.scheme-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.scheme-column {
  display: grid;
  gap: 12px;
}

.scheme-column > h3 {
  margin-bottom: 0;
}

.scheme-card {
  display: grid;
  gap: 10px;
}

.scheme-diagram {
  display: grid;
  gap: 6px;
  margin: 0;
}

.scheme-media-grid {
  display: grid;
  gap: 10px;
}

.scheme-media {
  display: grid;
  gap: 6px;
  margin: 0;
}

.scheme-diagram span,
.scheme-media span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scheme-diagram img {
  width: 100%;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  object-fit: contain;
}

.scheme-media img,
.scheme-media video,
.scheme-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  object-fit: cover;
}

.plan-card,
.eligibility-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
}

.eligibility-card {
  display: grid;
  gap: 12px;
}

.eligibility-grid,
.lineup-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.preline {
  white-space: pre-line;
}

.feature-setup-note {
  border-color: rgba(159, 18, 57, 0.24);
  background: #fff1f2;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.account-form {
  margin: 14px 0 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.version-card {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.version-card strong {
  font-size: 1.5rem;
}

.version-history {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.version-history-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.version-history-item div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.version-history-item strong {
  color: var(--navy);
}

.version-history-item span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.version-history-item ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 0.9rem;
}

.profile-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.profile-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.profile-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-row small {
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-row span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.setup-grid {
  display: grid;
  gap: 12px;
}

.code-block {
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
  white-space: pre-wrap;
}

.card-actions {
  margin-top: 14px;
}

.player-detail {
  display: block;
  min-width: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow-wrap: anywhere;
  scroll-margin-top: 14px;
}

.action-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
}

.button-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.button-group > span {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-action {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.danger {
  border: 0;
  color: #9f1239;
  background: transparent;
  font-weight: 800;
}

.file-link {
  display: inline-grid;
  place-items: center;
  margin: 8px 0 4px;
  text-decoration: none;
}

.link-pill {
  text-decoration: underline;
}

dialog {
  width: min(880px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.32);
}

dialog::backdrop {
  background: rgba(4, 11, 23, 0.62);
}

.record-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-message[data-kind="success"] {
  color: var(--success);
}

.form-message[data-kind="error"] {
  color: #9f1239;
}

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

.mobile-nav {
  display: none;
}

@media (min-width: 821px) and (max-width: 1100px) {
  .player-row {
    grid-template-columns: 38px 34px minmax(100px, 1.6fr) minmax(75px, 1fr) 55px 18px;
    gap: 8px;
    padding: 10px;
  }

  .player-row-grade {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  main {
    padding-bottom: 116px;
  }

  .hero {
    min-height: 210px;
  }

  .hero img {
    height: 250px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(7, 26, 51, 0.2), rgba(7, 26, 51, 0.94));
  }

  .hero-copy {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-grid,
  .dashboard-grid,
  .players-layout,
  .scheme-board,
  .detail-grid,
  .report-grid,
  .toolbar,
  .bulk-update-grid,
  .missing-player-row,
  .compact-form,
  .eligibility-grid,
  .lineup-slots,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .install-banner {
    right: 10px;
    bottom: 78px;
    left: 10px;
    align-items: stretch;
    flex-direction: column;
  }

  .player-list {
    grid-template-columns: 1fr;
  }

  #players .player-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .player-search-field {
    grid-column: 1 / -1;
  }

  .player-row {
    grid-template-columns: 34px 30px minmax(0, 1fr) auto 18px;
    column-gap: 8px;
    row-gap: 2px;
    padding: 8px 10px;
    min-height: 64px;
  }

  .player-row .record-headshot.small {
    width: 34px;
    height: 34px;
    grid-row: 1 / 3;
  }

  .player-row .player-number {
    width: 30px;
    height: 30px;
    grid-row: 1 / 3;
  }

  .player-row-name {
    grid-column: 3 / 5;
    font-size: .9rem;
  }

  .player-row-team {
    grid-column: 3;
    grid-row: 2;
    font-size: .75rem;
  }

  .player-row-position {
    grid-column: 4;
    grid-row: 2;
    font-size: .75rem;
  }

  .player-row-grade {
    display: none;
  }

  .player-row-chevron {
    grid-column: 5;
    grid-row: 1 / 3;
  }

  .player-row-options {
    padding: 12px;
  }

  .player-edit-profile {
    gap: 12px;
    padding: 10px;
  }

  .player-edit-profile .record-headshot.large {
    width: 72px;
    height: 72px;
  }

  .action-groups,
  .button-group {
    width: 100%;
  }

  .button-group {
    justify-content: space-between;
  }

  .mobile-nav {
    position: fixed;
    z-index: 5;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(23, 32, 51, 0.12);
  }

  .mobile-nav-group {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 5px;
    min-width: min-content;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
  }

  .mobile-nav-group > span {
    grid-column: 1 / -1;
    color: var(--muted);
  }

  .mobile-button {
    min-height: 48px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 850;
  }

  .mobile-button.active {
    color: #fff;
    background: var(--navy);
  }

}

@media print {
  body {
    background: #fff;
  }

  body > :not(.print-roster-sheet) {
    display: none !important;
  }

  .print-roster-sheet {
    display: block;
    padding: 0;
    color: #111827;
    font: 12px Arial, sans-serif;
  }

  .print-sheet-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #111827;
    padding-bottom: 10px;
  }

  .print-sheet-heading p {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .print-sheet-heading h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0;
  }

  .print-sheet-heading span {
    font-size: 11px;
    font-weight: 700;
    text-align: right;
  }

  .print-roster-group {
    break-inside: avoid;
    margin-bottom: 20px;
  }

  .print-roster-group h2 {
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px;
    font-size: 16px;
  }

  .print-roster-group table {
    width: 100%;
    border-collapse: collapse;
  }

  .print-roster-group th,
  .print-roster-group td {
    border: 1px solid #9ca3af;
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
  }

  .print-roster-group th {
    background: #e5e7eb;
    font-size: 10px;
    text-transform: uppercase;
  }
}
.payment-report-dialog { width: min(880px, calc(100% - 24px)); max-height: 92dvh; padding: 24px; border: 0; border-radius: 18px; background: #f2f5f9; color: #142844; }
.payment-report-dialog::backdrop { background: #101e36b8; }
.payment-report-controls { align-items: end; }
.payment-report-controls label { flex: 1; min-width: 180px; }
.payment-report-controls select { width: 100%; }
.payment-report-summary { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; }
.payment-report-summary strong { font-size: 36px; font-variant-numeric: tabular-nums; }
.payment-person { margin-bottom: 32px; }
.payment-person > .event-actions { margin-top: 12px; }
.payment-statement { overflow: hidden; background: white; border: 1px solid #dce3ed; border-top: 6px solid #c6a64d; border-radius: 12px; box-shadow: 0 8px 24px #1428440a; }
.payment-statement header { padding: 28px; background: #142844; color: white; }
.payment-statement header > p { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; color: #ebd38d; }
.payment-statement header > span { font-size: 13px; color: #ccd8e9; }
.payment-statement h3 { margin: 18px 0; font-size: 30px; overflow-wrap: anywhere; color: white; }
.payment-statement-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.payment-statement-total strong { font-size: 32px; color: #ebd38d; font-variant-numeric: tabular-nums; }
.payment-statement-entries { padding: 0 28px; }
.payment-statement-entry { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid #e3e8f0; }
.payment-statement-entry > div { min-width: 0; overflow-wrap: anywhere; }
.payment-statement-entry h4 { margin: 0 0 8px; font-size: 18px; }
.payment-statement-entry p { margin: 4px 0; font-size: 13px; color: #526076; }
.payment-statement-entry > strong { text-align: right; white-space: nowrap; font-size: 21px; font-variant-numeric: tabular-nums; }
.payment-statement-entry small { display: block; margin-top: 5px; color: #526076; font-size: 12px; font-weight: 400; }
.payment-statement footer { padding: 20px 28px; font-size: 12px; line-height: 1.6; color: #526076; }
@media (max-width: 540px) {
  .payment-report-dialog { padding: 16px; }
  .payment-statement header, .payment-statement footer { padding: 20px; }
  .payment-statement-entries { padding: 0 20px; }
  .payment-statement h3 { font-size: 26px; }
  .payment-statement-entry { flex-wrap: wrap; }
}
.team-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.team-card { text-align: left; padding: 24px; background: #fffdf8; border: 1px solid #d5cbb5; border-top: 4px solid #bd8c24; border-radius: 15px; color: #182840; cursor: pointer; }
.team-card:hover { box-shadow: 0 8px 24px #18284018; transform: translateY(-2px); }
.team-card h3 { margin: 12px 0; font-size: 21px; }
.team-card > strong { font-size: 30px; }
.team-card p { font-size: 13px; color: #647080; }
.team-card > span:last-child { color: #806016; font-weight: 700; }
.team-roster-dialog { width: min(1200px, calc(100% - 24px)); max-width: 1200px; padding: 24px; }
.roster-table-scroll { overflow-x: auto; }
.team-roster-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.team-roster-table th { text-align: left; background: #eee8d9; color: #665e50; font-size: 12px; text-transform: uppercase; }
.team-roster-table td, .team-roster-table th { padding: 16px 12px; border-bottom: 1px solid #d5cbb5; }
.team-roster-table td:nth-child(2) { font-weight: 700; }
.roster-tryout-number { font-size: 24px; font-weight: 800; color: #865d0b; }
.team-manager-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 100px; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid #ddd; }
.team-manager-name, .team-manager-counts { display: grid; gap: 5px; min-width: 0; }
.team-manager-name small, .team-manager-counts small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.team-manager-row > button { width: 100%; }
#teamManagerDialog button:disabled { cursor: not-allowed; }
#teamManagerDialog[aria-busy="true"] button:disabled { cursor: wait; }
#addTeamForm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
#addTeamForm > label { min-width: 0; margin: 0; }
#addTeamForm > button { margin: 0; min-height: 44px; }
@media (max-width: 540px) {
  .team-manager-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 10px 16px; }
  .team-manager-name { grid-column: 1; }
  .team-manager-counts { grid-column: 1; grid-row: 2; }
  .team-manager-row > button { grid-column: 2; grid-row: 1 / 3; }
  #addTeamForm { grid-template-columns: minmax(0, 1fr); }
}
.tryout-list { display: grid; gap: 14px; }
.tryout-card { padding: 20px; border: 1px solid #d5cbb5; background: #fffdf8; border-radius: 14px; }
.tryout-identity { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.tryout-headshot { position: relative; display: block; width: 76px; height: 76px; overflow: hidden; border-radius: 12px; background: #e5eaf1; }
.tryout-headshot-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #142844; font-size: 25px; font-weight: 800; }
.tryout-headshot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tryout-identity > .tryout-number { grid-column: 3; grid-row: 1; }
.tryout-identity > div { grid-column: 2; grid-row: 1; }
@media (max-width: 540px) {
  .tryout-identity { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
  .tryout-headshot { width: 56px; height: 64px; }
  .tryout-identity > .tryout-number { min-width: 48px; font-size: 26px; padding: 6px; }
}
.tryout-identity h3 { margin: 0 0 5px; }
.tryout-identity p { margin: 5px 0; font-size: 14px; }
.tryout-number { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; min-width: 68px; padding: 8px; border-radius: 10px; background: #142844; color: #ffe3a0; font-size: 32px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.tryout-number small { font-size: 9px; letter-spacing: 1px; margin-bottom: 3px; }
.player-row-name { display: flex; align-items: center; gap: 10px; }
.player-row-name .tryout-number { min-width: 54px; font-size: 26px; }
.tryout-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 16px; }
.tryout-actions label { max-width: 140px; }
.checked-in { color: #166534; font-weight: 700; }
#teamManagerDialog { padding: 24px; }
.team-card h3, .tryout-identity h3, .team-manager-row strong { overflow-wrap: anywhere; }
.tryout-identity > div { min-width: 0; }
@media (max-width: 540px) { .tryout-card { padding: 14px; } .tryout-actions > button { flex-grow: 1; } .team-roster-dialog { padding: 16px; } }
.team-column { min-width: 0; border-radius: 15px; border: 2px solid transparent; align-self: start; }
.team-column > .team-card { width: 100%; }
.team-drop-active { border-color: #bd8c24; background: #f9edcd; box-shadow: 0 0 0 3px #bd8c2433; }
.team-player-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; min-height: 52px; }
.team-player-item { display: flex; align-items: center; gap: 8px; padding: 6px; background: #fffdf8; border: 1px solid #d5cbb5; border-radius: 8px; }
.team-player-item > span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.team-drag-handle { touch-action: none; user-select: none; cursor: grab; min-width: 44px; min-height: 44px; padding: 4px; font-size: 24px; }
.team-drag-handle:active { cursor: grabbing; }
.team-player-item .team-move-select { width: 80px; min-height: 44px; padding: 4px; font-size: 12px; }
.team-empty { padding: 16px; color: var(--muted); font-size: 14px; }
.team-drag-ghost { position: fixed; z-index: 10000; pointer-events: none; padding: 12px 18px; border-radius: 8px; background: #182840; color: white; box-shadow: 0 6px 20px #0003; }
@media (max-width: 767px) { .team-drag-handle { display: none; } .team-drag-help { display: none; } }

.team-player-grade { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
/* Lineup pool, scheme formations, and per-player effectiveness. */
.lineup-pool { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; background: var(--surface, #f4f6fa); border-radius: 12px; min-height: 90px; }
.lineup-player { display: flex; flex-direction: column; gap: 6px; text-align: left; touch-action: none; user-select: none; cursor: grab; min-height: 64px; }
.lineup-player small { font-weight: 400; }
.lineup-player[aria-pressed="true"], #courtTools [aria-pressed="true"] { outline: 3px solid #bf9b30; }
.lineup-slot { border: 2px dashed #a9b5c8; border-radius: 12px; padding: 8px; display: grid; gap: 8px; min-width: 0; }
.lineup-slot > .lineup-player { width: 100%; min-height: 90px; }
.lineup-slot.drop-active { background: #e6effa; border-color: #254d87; }
.dragging { opacity: .55; }
.formation-court { position: relative; width: min(100%, 600px); aspect-ratio: 10 / 9; background: #e8c89b; color: #fffdf6; margin: 16px auto; overflow: hidden; border-radius: 12px; }
.formation-court.full-court { aspect-ratio: 5 / 9; max-width: 420px; }
.formation-court svg { display: block; width: 100%; height: 100%; }
.court-marker { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #15345b; color: white; font-weight: 800; touch-action: none; user-select: none; }
button.court-marker { cursor: grab; }
.court-marker:focus-visible { outline: 3px solid #c74628; outline-offset: 2px; }
.player-scheme-ratings { display: grid; gap: 10px; margin: 20px 0; }
.player-scheme-ratings [hidden] { display: none; }
.rating-scheme { border: 1px solid #cbd3df; border-radius: 10px; padding: 14px; margin: 12px 0; }
.rating-scheme h4 { margin: 0; }
.rating-scheme summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.play-rating { display: grid; grid-template-columns: minmax(0, 1fr) 80px 40px; gap: 10px; align-items: center; padding: 8px 0; }
.play-rating input { width: 100%; }
.lineup-position, .saved-lineup-position { display: inline-flex; align-items: center; gap: 8px; }
.position-number { display: inline-grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: #15345b; color: #fff; font-size: 16px; font-weight: 800; }
.saved-lineup-position { margin: 4px 0; }
#schemeList { align-items: start; }
.scheme-diagram-toggle summary { cursor: pointer; color: #15345b; font-size: 1.2rem; font-weight: 700; padding: 8px 0; }
.scheme-diagram-toggle summary:focus-visible { outline: 2px solid #15345b; outline-offset: 4px; }
.diagram-toggle-hint { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); margin-top: 5px; }
.advanced-menu summary { cursor: pointer; padding: 12px; font-weight: 700; }
.advanced-menu[open] { padding-bottom: 8px; }
.advanced-menu button { width: 100%; }
.development-dialog { width: min(850px, 94vw); max-height: 90vh; overflow-y: auto; padding: 24px; border: 0; border-radius: 16px; }
.development-dialog::backdrop { background: #10233b99; }
.gpa-section { margin: 20px 0; padding: 16px; border: 1px solid #cbd3df; border-radius: 12px; }
.script-timeline { display: grid; gap: 18px; margin: 18px 0; }
.script-shift { padding: 18px; border: 1px solid #cad4e1; border-left: 4px solid #15345b; border-radius: 12px; background: white; }
.script-shift header, .game-script > header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.script-shift h3 { margin: 0; flex: 1; }
.script-five { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.script-five > div { display: flex; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 8px; background: #eff3f8; overflow-wrap: anywhere; }
.script-transition { border-top: 1px solid #cad4e1; padding-top: 12px; }
.game-script { margin-top: 8px; padding: 0; }
.game-script > summary { padding: 16px 20px; font-weight: 700; font-size: 1.05rem; cursor: pointer; overflow-wrap: anywhere; }
.game-script > summary:focus-visible { outline: 2px solid #15345b; outline-offset: 2px; }
.script-library-body { padding: 0 20px 20px; }
.script-image-page { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: .85rem; }
.script-image-page input { max-width: 110px; }

/* Shared controls and feedback for the stable coaching workflow. */
button, input, select, textarea { font: inherit; }
button { min-height: 42px; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #bd923b; outline-offset: 3px; }
.primary-action, .ghost-button, .danger { border-radius: 8px; }
.form-actions { gap: 10px; flex-wrap: wrap; }
.form-message:empty { display: none; }
.form-message[data-kind="success"] { color: #155b39; background: #e9f6ed; border-left: 3px solid #238454; padding: 10px 12px; border-radius: 6px; }
.form-message[data-kind="error"] { color: #932821; background: #fff0ee; border-left: 3px solid #b63f34; padding: 10px 12px; border-radius: 6px; }
.form-message[data-kind="pending"] { color: #284d77; background: #edf3fb; padding: 10px 12px; border-radius: 6px; }
.app-notice { position: fixed; top: 16px; right: 20px; z-index: 10000; width: min(480px, calc(100vw - 32px)); display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: #edf8f0; color: #155b39; border: 1px solid #8ec3a0; border-radius: 12px; box-shadow: 0 8px 32px #0b203b30; }
.app-notice[hidden] { display: none; }
.app-notice span { flex: 1; }
.app-notice button { background: transparent; border: 0; color: inherit; font-weight: 700; }
.app-notice[data-kind="error"] { color: #932821; background: #fff0ee; border-color: #d99d97; }
.app-notice[data-kind="pending"] { color: #284d77; background: #edf3fb; }
.archive-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #cad4e1; border-radius: 10px; background: white; margin: 8px 0; padding: 16px; }
.archive-row span { display: block; color: var(--muted); margin-top: 5px; }
.archive-badge { font-size: .75rem; background: #e9edf2; color: #526175; border-radius: 5px; padding: 3px 6px; }
.game-day-dialog { width: min(1200px, calc(100vw - 24px)); max-height: 96dvh; padding: 24px; background: #f4f7fb; overflow-y: auto; }
.game-day-dialog > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.game-day-dialog h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.game-day-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.game-day-grid > section { padding: 24px; background: white; border: 1px solid #cad4e1; border-radius: 14px; }
#gameDayCurrent { border-top: 5px solid #15345b; }
.game-day-five { list-style: none; padding: 0; display: grid; gap: 10px; }
.game-day-five li { display: flex; align-items: center; gap: 14px; padding: 14px; background: #eff3f8; border-radius: 8px; font-size: clamp(1rem, 2vw, 1.35rem); }
.game-day-five .position-number { width: 36px; height: 36px; font-size: 20px; }
.game-day-changes { padding-left: 20px; line-height: 1.7; }
.game-day-dialog footer { display: flex; justify-content: space-between; gap: 16px; position: sticky; bottom: -24px; background: #f4f7fb; padding: 16px 0; border-top: 1px solid #cad4e1; }
.game-day-dialog footer button { min-height: 52px; min-width: 150px; }
@media (max-width: 700px) { .game-day-grid { grid-template-columns: 1fr; } .game-day-dialog { padding: 16px; } .game-day-grid > section { padding: 16px; } .app-notice { right: 16px; } .form-actions > button { flex: 1 1 auto; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (max-width: 700px) { .script-five { grid-template-columns: 1fr; } .mobile-nav .advanced-menu { flex: 1 0 100%; } }
@media (max-width: 700px) { .lineup-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lineup-pool .lineup-player { flex: 1 1 140px; } }

.offline-entry { display: block; padding: 12px 20px; text-align: center; }
.offline-game-day { width: min(1100px, 100%); margin: auto; padding: 24px; }
.offline-game-day footer { position: sticky; bottom: 0; background: #fff; padding: 16px 0; display: flex; gap: 12px; flex-wrap: wrap; }

.checklist-edit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
.checklist-edit-row label { flex: 1 1 220px; }
.checklist-body { padding-top: 16px; }
.checklist-body fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 16px 0; }
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 10px; cursor: pointer; }
.checklist-item input { width: 22px; height: 22px; flex-shrink: 0; }
.checklist-item input:checked + span { text-decoration: line-through; color: var(--muted); }

.lineup-slot select { width: 100%; min-width: 0; min-height: 44px; }
