/* SelectTransferPortal — polished static mock */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-muted: #64748b;
  --ink-soft: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --brand: #0b5fff;
  --brand-dark: #0847c7;
  --brand-soft: #e8f0ff;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --success: #059669;
  --success-soft: #d1fae5;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

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

/* ——— Layout ——— */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.main {
  flex: 1;
  padding: 1.5rem 0 3rem;
}

/* ——— Top nav ——— */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topnav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 34px;
  flex-shrink: 0;
}

.brand-logo {
  width: 72px;
  height: 34px;
  display: block;
}

.brand-text {
  font-size: 1.05rem;
}

.brand-text span {
  color: var(--brand);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  border: 1px solid #99f6e4;
}

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

.nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--ink-muted);
  font-weight: 550;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}

.nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-cta {
  margin-left: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--brand);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .brand-text {
    font-size: 0.95rem;
  }
}

/* ——— Search layout (sidebar + results) ——— */
.search-intro {
  margin-bottom: 1.15rem;
}

.search-intro h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
  font-weight: 750;
}

.search-intro p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 40rem;
  font-size: 0.98rem;
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(280px, 300px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.filters-mobile-bar {
  display: none;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.filters-sidebar {
  min-width: 0;
}

.filters-sidebar-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: var(--shadow);
}

.filters-drawer-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.filters-drawer-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.filters-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-check {
  padding: 0.15rem 0;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ink);
}

.filters-actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.filters-actions .hint {
  text-align: center;
}

.filters-backdrop {
  display: none;
}

.results-panel {
  min-width: 0;
}

.search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
  align-items: center;
}

@media (max-width: 860px) {
  .search-layout {
    grid-template-columns: 1fr;
  }

  .filters-mobile-bar {
    display: flex;
  }

  .filters-drawer-header {
    display: flex;
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    pointer-events: none;
  }

  .filters-sidebar.open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .filters-sidebar-inner {
    position: static;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 55;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .filters-backdrop[hidden] {
    display: none;
  }

  body.filters-open {
    overflow: hidden;
  }

  #view-search.active {
    height: auto;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.15);
}

.field-span-2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .field-span-2 {
    grid-column: span 1;
  }
}

.search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
  color: inherit;
  background: transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--ink);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #047857;
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.field .hint {
  margin-top: 0.2rem;
}


/* Lock page scroll on desktop search so only results-list scrolls */
@media (min-width: 861px) {
  body.search-scroll-lock {
    overflow: hidden;
    height: 100vh;
  }

  body.search-scroll-lock .main {
    padding-top: 1rem;
    padding-bottom: 1rem;
    overflow: hidden;
  }

  body.search-scroll-lock .site-footer {
    display: none;
  }
}

/* Desktop search: nav + filters locked; results panel scrolls */
@media (min-width: 861px) {
  #view-search.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-h) - 2rem);
    min-height: 0;
  }

  #view-search.active .search-intro {
    flex-shrink: 0;
  }

  #view-search.active .search-layout {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }

  #view-search.active .filters-sidebar {
    align-self: stretch;
    min-height: 0;
  }

  #view-search.active .filters-sidebar-inner {
    position: static;
    height: 100%;
    max-height: none;
    overflow-y: auto;
  }

  #view-search.active .results-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  #view-search.active .results-panel .toolbar {
    flex-shrink: 0;
  }

  #view-search.active .results-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    overscroll-behavior: contain;
  }
}

.chip-sport {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
  text-transform: capitalize;
}

.chip-sport-softball {
  background: #fdf2f8;
  color: #9d174d;
  border-color: #fbcfe8;
}

/* ——— Results ——— */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.toolbar h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

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

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.chip-open {
  background: var(--success-soft);
  color: var(--success);
  border-color: #a7f3d0;
}

.chip-closed {
  background: #f1f5f9;
  color: var(--ink-soft);
}

.chip-level {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #bfdbfe;
}

.chip-coach-pro {
  background: var(--warn-soft);
  color: #b45309;
  border-color: #fde68a;
}

.chip-coach-parent {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.char-counter {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
}

.team-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.team-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.team-card .sub {
  color: var(--ink-muted);
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
}

.distance {
  text-align: right;
  min-width: 5.5rem;
}

.distance .miles {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.distance .label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-muted);
}

.empty-state strong {
  color: var(--ink);
  display: block;
  margin-bottom: 0.35rem;
}

/* ——— Page headers ——— */
.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  letter-spacing: -0.03em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--brand);
}

.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--warn-soft);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  color: #92400e;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.demo-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ——— Profile layout ——— */
.profile-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
}

@media (max-width: 800px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 1rem;
}

.card h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.55rem 0.75rem;
  font-size: 0.92rem;
}

@media (max-width: 520px) {
  .dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .dl dt {
    margin-top: 0.45rem;
  }
}

.dl dt {
  color: var(--ink-muted);
  font-weight: 550;
}

.dl dd {
  margin: 0;
}

.coach-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.coach-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.coach-name {
  font-weight: 650;
}

.contact-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.stat-pill {
  flex: 1;
  min-width: 100px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.stat-pill .val {
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.stat-pill .lbl {
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ——— Forms ——— */
.form-section {
  margin-bottom: 1.25rem;
}

.form-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

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

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

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

/* v10b — Coaches: one row per coach (name · role · coach type), identical columns */
.coach-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.coach-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: end;
}

.coach-row .field input,
.coach-row .field select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 2.75rem; /* input + select share one height so each coach row lines up */
}

/* Any extra per-coach detail fields (email, phone…) wrap onto a second row under their coach */
.coach-row .coach-field-full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .coach-rows {
    gap: 1.1rem;
  }

  .coach-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .coach-row + .coach-row {
    padding-top: 1.1rem;
    border-top: 1px dashed var(--border);
  }
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.check input {
  accent-color: var(--brand);
  width: 1rem;
  height: 1rem;
}

.verify-note {
  background: var(--brand-soft);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  color: #1e3a8a;
  margin-top: 0.5rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ——— Privacy modes ——— */
.mode-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mode-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  cursor: pointer;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.mode-card:hover {
  border-color: #93c5fd;
}

.mode-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.12);
  background: #f8fbff;
}

.mode-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mode-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.mode-card .default-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.checklist.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ——— Toast ——— */
.toast-host {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
}

.toast {
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  animation: toast-in 0.25s ease;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.toast.success {
  background: #064e3b;
}

.toast .toast-demo {
  display: block;
  opacity: 0.75;
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.muted-link {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.sort-select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  background: #fff;
  font-size: 0.88rem;
}

.gc-link {
  word-break: break-all;
}

.opening-positions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.pos-tag {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}


/* ——— v9 auth: Register / Log in + account menu ——— */
.topnav-inner .nav-links {
  margin-left: auto;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-auth-guest {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--border);
}

.nav-auth-guest[hidden],
.account-menu[hidden],
.account-dropdown[hidden] {
  display: none !important;
}

.nav-auth-guest .nav-cta {
  margin-left: 0.15rem;
}

.account-menu {
  position: relative;
  padding-left: 0.6rem;
  border-left: 1px solid var(--border);
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.account-btn:hover,
.account-btn[aria-expanded="true"] {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.account-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.account-btn[aria-expanded="true"] .account-caret {
  transform: rotate(180deg);
}

.account-caret {
  transition: transform 0.15s;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, var(--brand));
  color: #fff;
  font-weight: 750;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  user-select: none;
}

.avatar.avatar-coach {
  background: linear-gradient(135deg, #14b8a6, var(--accent));
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  z-index: 60;
  animation: stp-pop 0.12s ease-out;
}

@keyframes stp-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.account-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.3rem;
}

.account-dropdown-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.account-dropdown-id strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dropdown-id .meta {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-role-chip {
  align-self: flex-start;
  margin-top: 0.2rem;
  font-size: 0.7rem;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 550;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-item svg {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.account-item:hover,
.account-item:focus-visible {
  background: var(--bg);
  text-decoration: none;
  outline: none;
}

.account-logout {
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  color: var(--danger);
}

.account-logout svg {
  color: var(--danger);
}

@media (max-width: 800px) {
  .nav-auth-guest,
  .account-menu {
    border-left: 0;
    padding-left: 0;
  }

  .nav-auth-guest .nav-login {
    padding: 0.45rem 0.55rem;
  }

  .nav-auth-guest .nav-cta {
    padding: 0.45rem 0.75rem;
  }

  .account-caret {
    display: none;
  }

  .account-btn {
    padding: 0.2rem;
  }

  /* Full-width sheet under the nav for easy tapping */
  .account-dropdown {
    position: fixed;
    top: calc(var(--nav-h) + 0.35rem);
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }

  .account-item {
    min-height: 48px;
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .brand-text {
    display: none;
  }

  .brand-mark,
  .brand-logo {
    width: 58px;
  }

  /* Badge stays visible; wraps to two short lines on phones */
  .beta-badge {
    margin-left: 0;
    white-space: normal;
    max-width: 5.6rem;
    line-height: 1.15;
    font-size: 0.58rem;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    text-align: center;
  }

  .nav-auth {
    gap: 0.3rem;
  }

  .nav-auth-guest .nav-login {
    padding: 0.45rem 0.4rem;
    font-size: 0.88rem;
  }

  .nav-auth-guest .nav-cta {
    padding: 0.45rem 0.65rem;
    font-size: 0.86rem;
  }

  .topnav-inner {
    gap: 0.5rem;
  }
}

.nav-login-menu {
  display: none !important;
}

@media (max-width: 359px) {
  /* Tiny phones: "Log in" moves into the menu so the bar never overflows */
  .nav-auth-guest .nav-login {
    display: none;
  }

  body[data-role="guest"] .nav-login-menu {
    display: block !important;
  }

  .brand-mark,
  .brand-logo {
    width: 46px;
  }

  .nav-auth-guest .nav-cta {
    padding: 0.45rem 0.55rem;
  }
}

/* Auth screens */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 1rem;
}

.auth-card {
  width: min(560px, 100%);
  padding: 1.6rem;
}

.auth-title {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 1.15rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-form[hidden] {
  display: none;
}

.auth-form .form-section {
  margin-bottom: 0.25rem;
}

.auth-form .field input,
.auth-form .field select {
  min-height: 44px;
  font-size: 16px; /* prevents iOS zoom */
}

.auth-note {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.82rem;
}

.auth-hint {
  margin: 0.6rem 0 0;
}

.optional {
  font-weight: 450;
  color: var(--ink-soft);
  font-size: 0.85em;
}

.btn-lg {
  min-height: 48px;
  font-size: 1rem;
}

.form-error {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 550;
}

.form-error[hidden] {
  display: none;
}

.auth-switch {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

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

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  min-height: 64px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.role-option:hover {
  border-color: var(--border-strong);
}

.role-option.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.12);
}

.role-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--brand);
  flex-shrink: 0;
}

.role-option.selected .role-icon {
  background: #fff;
}

.role-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.role-text strong {
  font-size: 0.95rem;
}

.role-text span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

@media (max-width: 520px) {
  .auth-card {
    padding: 1.15rem;
  }

  .auth-title {
    font-size: 1.3rem;
  }

  .role-picker {
    grid-template-columns: 1fr;
  }
}

.field-label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 0.35rem;
}

.segmented-opt {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.segmented-opt.selected {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow);
}

.demo-accounts {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-strong);
}

.demo-accounts-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}

.demo-accounts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.demo-account-btn {
  justify-content: flex-start;
  gap: 0.6rem;
  min-height: 52px;
  text-align: left;
}

.demo-account-btn > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.demo-account-btn .meta {
  font-size: 0.75rem;
  font-weight: 450;
}

@media (max-width: 420px) {
  .demo-accounts-row {
    grid-template-columns: 1fr;
  }
}

.gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

/* Footer dev switcher */
.demo-roles {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.demo-roles-label {
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.2rem;
}

.demo-role-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 28px;
}

.demo-role-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

/* ——— Favorites / cards ——— */
.team-card-wrap {
  position: relative;
}
.team-card-wrap .team-card {
  padding-right: 2.75rem;
}

.team-card-wrap .fav-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink-muted);
  box-shadow: var(--shadow);
}

.icon-btn:hover {
  color: #e11d48;
  border-color: #fda4af;
}

.icon-btn.is-fav {
  color: #e11d48;
  background: #fff1f2;
  border-color: #fecdd3;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-title-row h1 {
  margin: 0;
}

.masked-contact {
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.masked-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  filter: blur(3px);
  user-select: none;
}

.tryout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

/* ——— Modals ——— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(440px, 100%);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

/* Players search uses same scroll lock */
@media (min-width: 861px) {
  #view-players.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-h) - 2rem);
    min-height: 0;
  }
  #view-players.active .search-intro { flex-shrink: 0; }
  #view-players.active .search-layout {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  #view-players.active .filters-sidebar-inner {
    position: static;
    height: 100%;
    overflow-y: auto;
  }
  #view-players.active .results-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  #view-players.active .results-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 860px) {
  #view-players.active {
    height: auto;
  }
}


/* ——— v6 account-model: privacy + tryout gate ——— */
.privacy-name-slot {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--ink-muted);
  font-style: italic;
}

.player-card-anon h3 {
  max-width: 28rem;
}

.privacy-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.gated-tryout .gate-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.btn-gated {
  opacity: 0.85;
}

.account-model-note {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 1rem;
}

.site-footer .account-model-note {
  margin: 0.35rem 0 0;
}


/* ——— v7 parent contact ——— */
.chip-parent-contact {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.parent-contact-snip {
  margin-top: 0.45rem;
  font-size: 0.82rem;
}

.register-player-fields {
  margin: 0.85rem 0 0.25rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.register-fields-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.modal-register {
  width: min(480px, 100%);
}

.modal-register .form-grid {
  gap: 0.65rem;
}


/* ——— v8 blind parent relay ——— */
.modal-relay {
  width: min(480px, 100%);
}

.relay-to-input {
  background: var(--bg);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.relay-dd .btn-relay {
  margin-top: 0.15rem;
}

.relay-hint {
  font-size: 0.82rem;
}

.btn-relay:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

/* ——— v9b: Player profile — Save at bottom ——— */
.profile-save-bar {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-save-bar .meta {
  margin: 0;
  flex: 1 1 260px;
}

@media (max-width: 520px) {
  .profile-save-bar .btn {
    width: 100%;
  }
}

/* ——— v9b: Billing (sample payment step) ——— */
.billing-plan {
  background: var(--brand-soft);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  color: #1e3a8a;
}

.billing-plan p {
  margin: 0.35rem 0 0;
}

.billing-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.billing-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand);
}

.billing-price span {
  font-size: 0.8rem;
  font-weight: 600;
}

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

.billing-row .field {
  min-width: 0;
}

.billing-row .field input {
  width: 100%;
  box-sizing: border-box;
}

.billing-card .field input {
  min-height: 44px;
}

/* ——— v9d: auto-apply filters (no Apply button) + drawer "Show N" footer ——— */
.filters-sidebar-inner {
  display: flex;
  flex-direction: column;
}

/* Header now shows on desktop too so Reset sits at the top of the sticky sidebar */
.filters-drawer-header {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
}

.filters-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filters-reset-link {
  color: var(--brand);
  font-weight: 650;
}

.filters-reset-link:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.filters-close-btn {
  display: none;
}

.filters-drawer-footer {
  display: none;
}

.filters-hint {
  margin: 0.85rem 0 0;
  text-align: center;
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

@media (min-width: 861px) {
  #view-search.active .filters-sidebar-inner,
  #view-players.active .filters-sidebar-inner {
    overflow: hidden;
  }

  #view-search.active .filters-form,
  #view-players.active .filters-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    /* room so focus rings aren't clipped by the scroll container */
    margin: 0 -0.35rem;
    padding: 0.1rem 0.35rem 0.2rem;
  }
}

@media (max-width: 860px) {
  .filters-sidebar-inner {
    padding: 0;
    height: 100%;
    overflow: hidden;
  }

  .filters-drawer-header {
    margin: 0;
    padding: 0.4rem 0.6rem 0.4rem 1rem;
  }

  .filters-close-btn {
    display: inline-flex;
  }

  .filters-header-actions .btn {
    min-height: 40px;
    padding: 0.35rem 0.75rem;
  }

  /* Scrollable body; footer below always visible */
  .filters-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.65rem 1rem 0.85rem;
  }

  .filters-drawer-footer {
    display: block;
    flex-shrink: 0;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
  }

  .filters-drawer-footer .btn {
    min-height: 46px;
    font-size: 0.98rem;
  }

  /* Light condensing — controls stay ≥40px tall */
  .filters-stack {
    gap: 0.55rem;
  }

  .filters-sidebar .field {
    gap: 0.2rem;
  }

  .filters-sidebar .field label {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }

  .filters-sidebar .field input,
  .filters-sidebar .field select {
    min-height: 40px;
    padding: 0.4rem 0.6rem;
    font-size: 16px; /* prevents iOS focus zoom */
  }

  .filters-sidebar .filter-check {
    display: flex;
    min-height: 40px;
    padding: 0;
    gap: 0.55rem;
  }

  .filters-sidebar .filter-check input {
    width: 1.15rem;
    height: 1.15rem;
  }

  .filters-hint {
    margin-top: 0.6rem;
  }
}

/* Coach-only "Open to new team" row: honor [hidden] (display rules above would override it) */
.filter-check[hidden],
.filters-sidebar .filter-check[hidden] {
  display: none;
}

/* ——— v9e: result paging (Search Teams + Browse/Search Players) ——— */
.results-more {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.5rem 0 0.75rem;
  text-align: center;
}

.results-more-count {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.results-more-btn {
  width: 100%;
  min-height: 44px;
}

.results-more-next {
  font-weight: 500;
  opacity: 0.7;
  margin-left: 0.25rem;
}

/* ——— v10: live data — loading + error states, auth extras ——— */
.app-loading,
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  padding: 3rem 1rem;
}
.app-loading[hidden],
.app-loading-error[hidden] {
  display: none;
}
.loading-state {
  padding: 2rem 1rem;
}
.app-loading-error {
  max-width: 520px;
  margin: 3rem auto;
  text-align: center;
}
body.app-is-loading .view {
  display: none !important;
}
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--brand);
  animation: stp-spin 0.8s linear infinite;
  flex: none;
}
@keyframes stp-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
}
.toast.error {
  background: #7f1d1d;
}
button[aria-busy="true"] {
  opacity: 0.75;
  cursor: progress;
}
.forgot-link {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 550;
}
.forgot-link:hover {
  text-decoration: underline;
}
.resend-box {
  margin: 0.25rem 0 0.75rem;
}
.resend-box .hint,
#check-email-status {
  margin: 0.4rem 0 0;
  min-height: 1em;
}
.check-email-tips {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  line-height: 1.6;
}

/* ——— v11: Stripe billing (test mode) — trial step, success page, Subscription panel ——— */
.billing-points {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.billing-points li + li {
  margin-top: 0.3rem;
}

.billing-secure {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

.billing-secure svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.sub-panel {
  margin-bottom: 1rem;
}

.sub-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.sub-panel-head h2 {
  margin: 0;
}

.sub-status {
  margin: 0.25rem 0 0.2rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.sub-detail {
  margin: 0 0 0.85rem;
}

.sub-detail:empty {
  display: none;
}

.sub-renew {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* v11f — initial coach setup banner (team form, no billing history yet) */
.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: var(--brand-soft);
  border: 1px solid #bfd3ff;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.setup-banner-finish {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.setup-banner-step {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.setup-banner-title {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.05rem;
}
.setup-banner-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.setup-banner-cta {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .setup-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .setup-banner-cta {
    text-align: center;
  }
}
.setup-banner[hidden],
.setup-banner-cta[hidden],
.sub-panel[hidden],
.sub-renew[hidden],
.sub-actions [hidden] {
  display: none;
}

.chip-warn {
  background: var(--warn-soft);
  color: #92400e;
  border-color: #fde68a;
}

/* Accessible on/off switch (checkbox underneath) */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.15s;
  flex-shrink: 0;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s;
}

.switch input:checked + .switch-track {
  background: var(--success);
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.55;
}

@media (max-width: 520px) {
  .sub-actions .btn {
    width: 100%;
  }
}

/* ——— v11b: Monthly / Yearly plan picker on #/billing ——— */
.plan-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  margin: 0.7rem 0 0.35rem;
}

.plan-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.plan-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-option-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.plan-option input:checked + .plan-option-body {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.15);
}

.plan-option input:focus-visible + .plan-option-body {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.plan-option-name {
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.plan-option-price {
  font-weight: 800;
  color: var(--brand);
  font-size: 1rem;
}

.plan-option-price small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.plan-save {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

.plan-picker[hidden] {
  display: none;
}

@media (max-width: 360px) {
  .plan-picker {
    grid-template-columns: 1fr;
  }
}

/* ——— v11g: freeform Upcoming tryouts ——— */
.chip-tryouts {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.tryout-info {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.tryout-info-updated {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.field-help {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.char-counter.near-max {
  color: #b45309;
}
.tryout-none {
  color: var(--ink-soft);
}

/* v11g: required home ZIP prompt (legacy players without a ZIP) */
.zip-required-hint {
  color: #b45309;
}

/* v11h: Positions multi-select (toggle chips), position chips, player notes */
.pos-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pos-fieldset legend {
  padding: 0;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pos-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pos-check {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.field .pos-check input,
.pos-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}
.pos-check span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pos-check:hover span {
  border-color: var(--brand);
}
.pos-check input:checked + span {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
}
.pos-check input:checked + span::before {
  content: "✓";
  margin-right: 0.3rem;
  font-size: 0.75rem;
}
.pos-check input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.pos-checks-compact .pos-check span {
  min-width: 2.3rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
}
.pos-fieldset[aria-invalid="true"] .pos-check span {
  border-color: var(--danger);
}
.pos-fieldset[aria-invalid="true"] legend {
  color: var(--danger);
}
.chip-pos {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #bfdbfe;
}
.chip-years {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}
.pos-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.player-notes {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.checklist-relay-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}
.required-hint {
  color: #b45309;
}
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.coach-only-filters {
  display: flex;
  flex-direction: column;
  gap: inherit;
}
.coach-only-filters[hidden] {
  display: none;
}
.chip-updated {
  background: #f8fafc;
  color: var(--ink-soft);
  font-weight: 500;
}
.updated-line {
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.bt-required-hint {
  grid-column: 1 / -1;
  margin: -0.4rem 0 0;
}
.bt-required-hint[hidden] {
  display: none;
}
.field[hidden] {
  display: none;
}

/* ——— v11i: birth month/year → computed age group; contact links ——— */
.age-group-field .field-label {
  font-size: 0.75rem;
  font-weight: 650;
}
.age-group-display {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.95rem;
}
.age-group-display.is-legacy {
  background: #fef3c7;
  color: #92400e;
}
.age-flag[hidden] {
  display: none;
}
.player-card[role="link"]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.parent-contact-snip a {
  position: relative;
  z-index: 1;
}
.contact-stack a.btn {
  text-align: center;
  text-decoration: none;
}

/* ——— v11j: Open to a new team = master contact switch ——— */
.chip-not-looking {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.not-looking-note {
  margin: 0.35rem 0 0;
}
.open-off-note[hidden] {
  display: none;
}

/* ——— v11k: grade exception → second (one-younger) age group ——— */
.chip-age {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #bfdbfe;
}
.chip-age-exc {
  border-style: dashed;
}
.age-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.age-group-display.age-group-exc {
  border: 1px dashed #93c5fd;
  font-size: 0.85rem;
}
.age-group-display[hidden],
.grade-exc-note[hidden] {
  display: none;
}
.grade-exc-field label.check {
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
}
.grade-exc-field .check input {
  padding: 0;
  border: 0;
  box-shadow: none;
}
.grade-exc-field .check .optional {
  font-weight: 500;
}

/* ——— v11l: Parent accounts — the player's name is never shown ——— */
.private-hint {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  color: #166534;
}
.private-hint svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.notes-warning {
  margin: 0 0 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-weight: 600;
}
.check .check-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.checklist-name-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}
.family-heading.is-anon {
  color: var(--ink-muted);
}

/* v11l: School district picker (+ "Other…" free text) */
#pf-district-other { margin-top: 0.5rem; }
#pf-district-other[hidden] { display: none !important; }

/* v11n — locked family details for coaches whose team isn't active */
.coach-lock-banner {
  margin: 0 0 1rem;
}
#view-players .coach-lock-banner {
  flex-shrink: 0;
}
.player-card-locked .family-heading.is-locked {
  color: var(--ink);
  margin-bottom: 0.1rem;
}
.unlock-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.unlock-link:hover,
.unlock-link:focus-visible {
  text-decoration: underline;
}
.locked-banner svg,
.locked-dd svg {
  vertical-align: -1px;
}
