/*
 * Court Report — main stylesheet
 * White background / black header / gold accents
 */

@keyframes cr-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes cr-ball-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-5px) rotate(-8deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(-3px) rotate(8deg); }
}

.cr-bounce {
  display: inline-block;
  animation: cr-bounce 1.8s ease-in-out infinite;
}

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

/* ── "Modern" palette ──────────────────────────────────────────────
   Cool near-white canvas · ink navy · teal lead accent · sunny amber
   pop · crisp win/loss. Muted text is deliberately dark for legibility.
   Division of accents: teal = interaction, amber = pop/brand highlight. */
:root {
  --cr-black: #1b2a4a;              /* ink navy — text, dark surfaces, hero */
  --cr-black-soft: #24344f;
  --cr-navy-page: #f4f8fc;          /* cool near-white page canvas */
  --cr-header-bg: #101d33;          /* deep navy header bar */
  --cr-dark-panel: #16273f;         /* dark calendar background */
  --cr-dark-panel-soft: #21344f;    /* lighter inset for day cells */
  --cr-dark-border: rgba(24, 39, 64, 0.22);  /* teal-tinted border on dark */
  --cr-gold: #7d8899;               /* sunny amber — pop / brand highlight */
  --cr-gold-soft: #7d8899;
  --cr-gold-bright: #7d8899;
  --cr-teal: #1b2a4a;              /* teal — the lead accent (fills) */
  --cr-teal-deep: #1b2a4a;         /* readable teal for link text on light */
  --cr-teal-tint: rgba(24, 39, 64, 0.14);
  --cr-white: #ffffff;
  --cr-bg: #eef3f9;                 /* cool light for subtle inset fills */
  --cr-border: #e1e8f1;
  --cr-text: #1b2a4a;
  --cr-text-muted: #4d5a72;         /* darker slate — reads clearly on light */
  --cr-text-light: #6f7c92;
  --cr-green: #1b2a4a;              /* win green */
  --cr-red: #6b7688;               /* loss red */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--cr-bg);
  color: var(--cr-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ========================================================
   League sub-nav (tabs with dropdowns below main header)
   ======================================================== */

.cr-league-nav {
  background: var(--cr-black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 76px;
  z-index: 90;
}

.cr-league-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.cr-league-tab {
  position: relative;
}

.cr-league-tab-button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cr-league-tab-button:hover { color: var(--cr-gold); }

.cr-league-tab-caret {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Open on hover (desktop) OR when Stimulus toggles the class (mobile) */
.cr-league-tab:hover .cr-league-dropdown,
.cr-league-tab.cr-league-tab-open .cr-league-dropdown {
  display: block;
}

.cr-league-tab:hover .cr-league-tab-button,
.cr-league-tab.cr-league-tab-open .cr-league-tab-button {
  color: var(--cr-gold);
  border-bottom-color: var(--cr-gold);
}

.cr-league-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  background: var(--cr-black-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 200;
  margin-top: -1px;
}

.cr-league-dropdown-item {
  display: block;
  padding: 12px 20px;
  color: var(--cr-white);
  text-decoration: none;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}

.cr-league-dropdown-item:hover {
  background: rgba(24, 39, 64, 0.12);
  border-left-color: var(--cr-gold);
}

.cr-league-dropdown-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cr-white);
  text-transform: none;
  letter-spacing: 0;
}

.cr-league-dropdown-meta {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 3px;
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 720px) {
  .cr-league-nav { top: 64px; }
  .cr-league-nav-inner { gap: 16px; padding: 0 16px; }
  .cr-league-tab-button { font-size: 0.75rem; padding: 12px 4px; }
  .cr-league-dropdown { min-width: calc(100vw - 32px); left: 0; }
}

/* ========================================================
   Header (Court Report)
   ======================================================== */

.cr-header {
  background: var(--cr-header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cr-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
}

.cr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cr-white);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.cr-brand-ball {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--cr-gold), var(--cr-gold-bright));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 3px 14px rgba(24, 39, 64, 0.4);
  overflow: hidden;
  flex-shrink: 0;
}

.cr-brand-ball-inner {
  display: inline-block;
  line-height: 1;
  animation: cr-ball-bounce 1.6s ease-in-out infinite;
}

.cr-brand-text {
  font-family: "Bebas Neue", "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: 2.2rem;
  letter-spacing: 5px;
  line-height: 1;
  color: var(--cr-white);
  white-space: nowrap;
}

.cr-brand-gold { color: var(--cr-gold); }

/* Small "YOUR" sitting above COURT REPORT (matches yourcourtreport.com). */
.cr-brand-your {
  display: block;
  font-size: max(0.36em, 9px);
  letter-spacing: 0.5em;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 2px 1px;
}

.cr-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin-left: auto;
}

.cr-header-pill {
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

.cr-header-pill:hover {
  border-color: var(--cr-gold);
  color: var(--cr-gold);
}

.cr-header-user {
  padding: 7px 16px;
  border: 1px solid var(--cr-gold);
  border-radius: 999px;
  color: var(--cr-gold);
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

/* The Sign Out form wrapper has no spacing of its own; the button keeps the
   normal pill padding (it used to be zeroed, so the outline hugged the words). */
.cr-header-signout form { padding: 0; margin: 0; }
.cr-header-signout { margin: 0; }

button.cr-header-pill {
  font-family: inherit;
  white-space: nowrap;
}

.cr-header-signup {
  background: var(--cr-gold) !important;
  color: var(--cr-black) !important;
  border-color: var(--cr-gold) !important;
  font-weight: 700;
}
.cr-header-signup:hover {
  opacity: 0.9;
}

/* ========================================================
   Main wrapper
   ======================================================== */

.cr-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ========================================================
   Flash messages
   ======================================================== */

.cr-flash {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.cr-flash-notice {
  background: #e3f1fb;
  color: #1b2a4a;
  border: 1px solid #e3f1fb;
}

.cr-flash-alert {
  background: #eef1f5;
  color: #1b2a4a;
  border: 1px solid #d5dbe4;
}

/* ========================================================
   Page header
   ======================================================== */

.cr-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.cr-page-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cr-page-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ========================================================
   Buttons
   ======================================================== */

.cr-btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--cr-teal);
  color: var(--cr-white);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
}

.cr-btn:hover {
  background: var(--cr-teal-deep);
}

.cr-btn-secondary {
  background: transparent;
  color: var(--cr-text);
  border: 1px solid var(--cr-border);
}

.cr-btn-secondary:hover {
  background: var(--cr-card);
  border-color: var(--cr-gold);
}

.cr-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ========================================================
   My Teams page
   ======================================================== */

.cr-leagues-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cr-league-section {
  margin-bottom: 0;
}

.cr-league-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cr-gold);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cr-border);
}

.cr-team-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .cr-leagues-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.cr-team-card {
  display: block;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--cr-text);
  transition: all 0.15s;
}

.cr-team-card:hover {
  border-color: var(--cr-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.cr-team-card-league {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cr-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cr-team-card-name {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: var(--cr-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.15;
}

.cr-team-card-meta {
  font-size: 0.78rem;
  color: var(--cr-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cr-team-card-record {
  color: var(--cr-gold);
  font-weight: 900;
  font-size: 0.9rem;
}

.cr-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--cr-text-light);
}

/* ========================================================
   Team Show page
   ======================================================== */

.cr-team-page {
  max-width: 1000px;
  margin: 0 auto;
}

.cr-back-link {
  color: var(--cr-text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: inline-block;
}

.cr-back-link:hover { color: var(--cr-gold); }

.cr-team-hero {
  background: linear-gradient(135deg, var(--cr-black) 0%, var(--cr-black-soft) 100%);
  color: var(--cr-white);
  border-radius: 16px;
  padding: 32px 36px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.cr-team-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 41px),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 41px);
  pointer-events: none;
}

.cr-team-hero-content {
  position: relative;
  z-index: 1;
}

.cr-team-hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cr-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cr-team-hero-name {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--cr-white);
}

.cr-team-hero-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.cr-team-hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cr-hero-stat {
  display: flex;
  flex-direction: column;
}

.cr-hero-stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--cr-gold);
  letter-spacing: 1px;
}

.cr-hero-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Sub-tabs (Schedule | Roster | Standings) ── */

.cr-subtabs {
  display: flex;
  border-bottom: 1px solid var(--cr-border);
  margin-bottom: 28px;
  gap: 0;
}

.cr-subtab {
  padding: 14px 24px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.cr-subtab:hover { color: var(--cr-text); }

.cr-subtab-active {
  color: var(--cr-teal-deep);
  border-bottom-color: var(--cr-teal);
}

/* ── Two-column schedule layout ── */

.cr-schedule-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

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

.cr-results-placeholder {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  overflow: hidden;
}

/* ── HOME / AWAY badge ── */

.cr-match-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.cr-match-home {
  background: #e3f1fb;
  color: #1b2a4a;
}

.cr-match-away {
  background: var(--cr-bg);
  color: var(--cr-text-muted);
}

/* ── Stat cards ── */

.cr-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.cr-stat-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-top: 3px solid var(--cr-gold);
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
}

.cr-stat-card-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--cr-text);
  line-height: 1;
}

.cr-stat-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Team sections ── */

.cr-section {
  margin-bottom: 22px;
}

.cr-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cr-text);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cr-border);
}

/* ── Schedule list ── */

.cr-match-list {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  overflow: hidden;
}

.cr-match-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cr-border);
  gap: 20px;
}

.cr-match-row:last-child { border-bottom: none; }

.cr-match-date {
  background: var(--cr-gold);
  color: var(--cr-black);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 64px;
  flex-shrink: 0;
}

.cr-match-date-month {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cr-match-date-day {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
}

.cr-match-info {
  flex: 1;
}

.cr-match-opponent {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cr-text);
}

.cr-match-location {
  font-size: 0.82rem;
  color: var(--cr-text-muted);
  margin-top: 2px;
}

.cr-match-time {
  font-size: 0.82rem;
  color: var(--cr-text-muted);
  font-weight: 600;
}

.cr-match-past .cr-match-date {
  background: var(--cr-bg);
  color: var(--cr-text-muted);
}

/* ── Match card (with availability) ──

   Forced vertical layout:
     [match row]
     [captain actions] (if captain)
     [lineup preview]  (if posted)

   display: flex + flex-direction: column guarantees these three
   sections stack vertically regardless of any stray inherited
   styles. */

.cr-match-card {
  display: flex;
  flex-direction: column;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.cr-match-card:hover {
  border-color: rgba(24, 39, 64, 0.45);
  box-shadow: 0 6px 18px rgba(10, 22, 40, 0.06);
}

.cr-match-card:last-child { margin-bottom: 0; }

/* Top row — date box on the left, opponent/location in the middle
   taking whatever space is left, badge + calendar on the right. */
.cr-match-card .cr-match-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: none;
  min-width: 0;
  flex-wrap: nowrap;
}

.cr-match-card .cr-match-date {
  background: var(--cr-black);
  color: var(--cr-white);
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  flex-shrink: 0;
  text-align: center;
}

.cr-match-card .cr-match-date-month {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cr-gold);
}

.cr-match-card .cr-match-date-day {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  margin-top: 3px;
  color: var(--cr-white);
}

.cr-match-card .cr-match-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cr-match-card .cr-match-opponent {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cr-text);
  overflow-wrap: break-word;
}

.cr-match-card .cr-match-location {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--cr-text-muted);
  overflow-wrap: break-word;
}

.cr-match-card .cr-match-badge {
  font-size: 0.68rem;
  padding: 3px 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.cr-match-card .cr-cal-btn {
  flex-shrink: 0;
}

.cr-match-counts {
  font-size: 0.78rem;
  color: var(--cr-text-muted);
  white-space: nowrap;
  display: flex;
  gap: 8px;
}

.cr-count-in { color: var(--cr-green); }
.cr-count-out { color: var(--cr-red); }
.cr-count-pending { color: var(--cr-text-light); }

/* ── Availability buttons row ── */

.cr-avail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 16px;
  flex-wrap: wrap;
}

.cr-avail-btn {
  padding: 8px 16px;
  border: 1px solid var(--cr-border);
  border-radius: 8px;
  background: var(--cr-card);
  color: var(--cr-text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.cr-avail-btn:hover {
  background: var(--cr-bg);
  color: var(--cr-text);
}

.cr-avail-in.avail-btn-active {
  background: #e3f1fb;
  border-color: #d6ecf9;
  color: #1b2a4a;
}

.cr-avail-out.avail-btn-active {
  background: #eef1f5;
  border-color: #d5dbe4;
  color: #1b2a4a;
}

.cr-avail-message {
  flex: 1;
  min-width: 140px;
  padding: 8px 14px;
  border: 1px solid var(--cr-border);
  border-radius: 8px;
  font-size: 0.84rem;
  color: var(--cr-text);
  background: var(--cr-card);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.cr-avail-message::placeholder { color: var(--cr-text-light); }
.cr-avail-message:focus { border-color: var(--cr-gold); }

.cr-avail-captain-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cr-gold);
  text-decoration: none;
  white-space: nowrap;
}

.cr-avail-captain-link:hover { text-decoration: underline; }

/* Locked state: selected button gets a bolder look */
.cr-avail-in.avail-btn-locked {
  border-width: 2px;
  font-weight: 800;
  cursor: default;
}

.cr-avail-out.avail-btn-locked {
  border-width: 2px;
  font-weight: 800;
  cursor: default;
}

/* "Saved!" flash indicator */
.cr-saved {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cr-green);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.cr-saved-visible {
  opacity: 1;
}

/* ── Custom confirmation popup ── */

.cr-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
}

.cr-popup-overlay.cr-popup-visible { opacity: 1; }

.cr-popup {
  background: var(--cr-card);
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.cr-popup-visible .cr-popup { transform: scale(1); }

.cr-popup-ball {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cr-popup-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cr-text);
  margin-bottom: 6px;
}

.cr-popup-sub {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  margin-bottom: 24px;
}

.cr-popup-buttons {
  display: flex;
  gap: 10px;
}

.cr-popup-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}

.cr-popup-cancel {
  background: var(--cr-bg);
  color: var(--cr-text-muted);
}

.cr-popup-cancel:hover {
  background: var(--cr-border);
  color: var(--cr-text);
}

.cr-popup-confirm {
  background: var(--cr-gold);
  color: var(--cr-black);
}

.cr-popup-confirm:hover {
  background: var(--cr-gold-bright);
}

/* ── Roster ── */

.cr-roster {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  overflow: hidden;
}

.cr-roster-row {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--cr-border);
  gap: 12px;
}

.cr-roster-row:last-child { border-bottom: none; }

.cr-roster-row:hover { background: var(--cr-bg); }

.cr-roster-name {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Matches played vs. the league minimum (MatchMinimums) */
.cr-mins-note { margin: -4px 0 12px; font-size: 0.82rem; line-height: 1.45; color: var(--cr-text-muted); }
.cr-mins-note-sub { display: block; font-size: 0.78rem; }
.cr-mins { flex: 0 0 auto; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cr-mins-ok { color: #1b2a4a; background: rgba(24, 39, 64,0.10); }
.cr-mins-short { color: #1b2a4a; background: #eef4fa; }
/* Roster as a table on computers: the name, then fixed columns for rating,
   matches played, role and buttons, so tags sit next to the name and every
   row lines up. */
.cr-roster-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cr-roster-who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.cr-roster-who .cr-roster-name { flex: 0 1 auto; min-width: 0; }
@media (min-width: 601px) {
  /* Name (with a Captain tag), then rating and matches played right beside
     it; the Matches / Make captain buttons line up at the right edge. */
  .cr-roster-table .cr-roster-row { display: grid; grid-template-columns: minmax(0, 260px) 46px 1fr 172px; column-gap: 14px; }
  .cr-roster-table.has-mins .cr-roster-row { grid-template-columns: minmax(0, 260px) 46px 132px 1fr 172px; }
  .cr-roster-table .cr-roster-cell-actions { grid-column: -2; justify-content: flex-end; }
  .cr-roster-table .cr-roster-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 600px) {
  /* Phones: name on its own line, the tags and buttons wrap underneath. */
  .cr-roster-row { flex-wrap: wrap; gap: 6px 8px; padding: 12px 16px; }
  .cr-roster-row .cr-roster-who { flex: 1 1 100%; }
  .cr-roster-cell { display: contents; }
}

.cr-roster-self {
  color: var(--cr-gold);
  font-weight: 700;
}

.cr-roster-rating {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cr-gold);
  padding: 3px 10px;
  background: rgba(24, 39, 64, 0.1);
  border-radius: 12px;
}

.cr-roster-role {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cr-text);
  background: var(--cr-bg);
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cr-roster-role-captain {
  color: var(--cr-black);
  background: var(--cr-gold);
}

/* ========================================================
   Login page
   ======================================================== */

.cr-login-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.cr-login-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.cr-login-card h1 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.cr-login-sub {
  color: var(--cr-text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.cr-field {
  text-align: left;
  margin-bottom: 18px;
}

.cr-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.cr-field input[type="text"],
.cr-field input[type="email"],
.cr-field input[type="password"],
.cr-field select {
  width: 100%;
  padding: 11px 14px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 8px;
  color: var(--cr-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.cr-field input:focus,
.cr-field select:focus { border-color: var(--cr-gold); }

/* Password field with show/hide eye toggle */
.cr-password-wrap {
  position: relative;
}

.cr-password-wrap input[type="password"],
.cr-password-wrap input[type="text"] {
  padding-right: 44px !important;
}

.cr-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cr-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

.cr-password-toggle:hover {
  background: var(--cr-bg);
}

.cr-login-card input[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--cr-gold);
  color: var(--cr-black);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.cr-login-card input[type="submit"]:hover { background: var(--cr-gold-bright); }

/* ========================================================
   Auth pages (sign in / sign up) — clean, focused cards
   ======================================================== */

.cr-auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 80px;
}

.cr-auth-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.cr-auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--cr-gold), var(--cr-gold-bright));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 3px 14px rgba(24, 39, 64, 0.35);
  overflow: hidden;
}

.cr-auth-logo-ball {
  display: inline-block;
  line-height: 1;
  animation: cr-ball-bounce 1.6s ease-in-out infinite;
}

.cr-auth-title {
  font-family: "Bebas Neue", "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: 2.4rem;
  letter-spacing: 4px;
  line-height: 1;
  color: var(--cr-text);
  margin-bottom: 6px;
}

.cr-auth-sub {
  color: var(--cr-text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.cr-auth-submit {
  width: 100%;
  padding: 12px;
  background: var(--cr-gold);
  color: var(--cr-black);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.cr-auth-submit:hover { background: var(--cr-gold-bright); }

.cr-auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--cr-text-muted);
}

.cr-auth-switch a {
  color: var(--cr-gold);
  font-weight: 600;
  text-decoration: none;
}

.cr-auth-switch a:hover { text-decoration: underline; }

/* ========================================================
   Admin pages (users index, etc.)
   ======================================================== */

.cr-admin-page {
  max-width: var(--cr-col);
  margin: 0 auto;
}

.cr-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  overflow: hidden;
}

.cr-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--cr-bg);
  border-bottom: 1px solid var(--cr-border);
}

.cr-table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--cr-text);
  border-bottom: 1px solid var(--cr-border);
}

.cr-table tr:last-child td { border-bottom: none; }

.cr-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cr-badge-admin  { background: var(--cr-gold); color: var(--cr-black); }
.cr-badge-player { background: var(--cr-bg); color: var(--cr-text-muted); }

/* ========================================================
   Profile page
   ======================================================== */

.cr-profile-page {
  max-width: 1000px;
  margin: 0 auto;
}

.cr-profile-header {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--cr-border);
}

.cr-profile-identity h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.cr-profile-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cr-profile-chip {
  padding: 4px 12px;
  background: var(--cr-bg);
  border-radius: 12px;
  font-size: 0.78rem;
  color: var(--cr-text-muted);
}

.cr-rating-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-top: 3px solid var(--cr-gold);
  border-radius: 12px;
  padding: 18px 22px;
  min-width: 180px;
}

.cr-rating-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cr-rating-card-value {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--cr-gold);
  line-height: 1;
  margin-top: 4px;
}

.cr-rating-card-date {
  font-size: 0.72rem;
  color: var(--cr-text-light);
  margin-top: 4px;
}

/* ========================================================
   Player profile
   ======================================================== */

.cr-player-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cr-border);
}

.cr-player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cr-gold);
  color: var(--cr-black);
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.cr-player-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cr-player-you {
  font-size: 0.85rem;
  color: var(--cr-gold);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.cr-player-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--cr-text-muted);
}

.cr-player-rating-chip {
  background: rgba(24, 39, 64, 0.12);
  color: var(--cr-gold);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
}

/* ── Clickable year rows (match history) ── */

.cr-year-row {
  border-bottom: 1px solid var(--cr-border);
}

.cr-year-row:last-child { border-bottom: none; }

.cr-year-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  gap: 16px;
  transition: background 0.15s;
}

.cr-year-header:hover { background: var(--cr-bg); }

.cr-year-label {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--cr-gold);
  min-width: 56px;
}

.cr-year-summary {
  flex: 1;
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--cr-text-muted);
}

.cr-year-win { color: var(--cr-green); font-weight: 600; }
.cr-year-loss { color: var(--cr-red); font-weight: 600; }
.cr-year-pct { color: var(--cr-text); font-weight: 700; }

.cr-year-caret {
  font-size: 0.75rem;
  color: var(--cr-text-light);
  transition: transform 0.2s;
}

.cr-year-header-open .cr-year-caret {
  transform: rotate(180deg);
}

.cr-year-detail {
  display: none;
  padding: 0 20px 20px;
}

.cr-year-detail-open { display: block; }

.cr-year-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cr-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.cr-year-section-label:first-child { margin-top: 0; }

.cr-year-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.cr-year-stat {
  background: var(--cr-bg);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}

.cr-year-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--cr-text);
}

.cr-year-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ========================================================
   Enter Results Form
   ======================================================== */

.cr-results-form { max-width: 720px; }

.cr-result-match-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  margin-bottom: 28px;
}

.cr-form-section { margin-bottom: 28px; }

.cr-form-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-gold);
  margin-bottom: 12px;
}

.cr-form-help {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  margin-bottom: 16px;
}

/* Win / Loss radio toggle */
.cr-result-toggle {
  display: flex;
  gap: 12px;
}

.cr-result-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid var(--cr-border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.2s;
  background: var(--cr-card);
}

.cr-result-option input[type="radio"] { display: none; }

.cr-result-win:has(input:checked) {
  border-color: var(--cr-green);
  background: #e3f1fb;
  color: var(--cr-green);
}

.cr-result-loss:has(input:checked) {
  border-color: var(--cr-red);
  background: #eef1f5;
  color: var(--cr-red);
}

/* Line cards */
.cr-line-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.cr-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cr-line-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cr-text);
}

.cr-line-result-toggle {
  display: flex;
  gap: 6px;
}

.cr-line-result-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--cr-border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  background: var(--cr-card);
}

.cr-line-result-opt input[type="radio"] { display: none; }

.cr-line-win-opt:has(input:checked) {
  border-color: var(--cr-green);
  background: #e3f1fb;
  color: var(--cr-green);
}

.cr-line-loss-opt:has(input:checked) {
  border-color: var(--cr-red);
  background: #eef1f5;
  color: var(--cr-red);
}

.cr-line-scores {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.cr-set-input label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.cr-input-small {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: center;
  background: var(--cr-bg);
}

.cr-input-small:focus {
  outline: none;
  border-color: var(--cr-gold);
  box-shadow: 0 0 0 2px rgba(24, 39, 64, 0.15);
}

.cr-line-players { margin-top: 8px; }

.cr-line-players-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.cr-select {
  width: 100%;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--cr-card);
  margin-bottom: 6px;
}

.cr-select:focus {
  outline: none;
  border-color: var(--cr-gold);
}

.cr-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--cr-border);
}

.cr-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.cr-btn-gold {
  background: var(--cr-teal);
  color: var(--cr-white);
}

.cr-btn-gold:hover { background: var(--cr-teal-deep); }

.cr-btn-outline {
  background: transparent;
  border: 2px solid var(--cr-border);
  color: var(--cr-text-muted);
}

.cr-btn-outline:hover,
.cr-menu-open > .cr-btn-outline.cr-menu-trigger {
  /* Light tint, not the solid teal .cr-btn:hover gives (dark text on dark teal
     was unreadable, and phones keep "hover" after a tap). */
  background: var(--cr-teal-tint);
  border-color: var(--cr-text-muted);
  color: var(--cr-text);
}

/* Results display on team page */
.cr-result-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cr-result-badge-win {
  background: #e3f1fb;
  color: var(--cr-green);
  border: 1px solid #e3f1fb;
}

.cr-result-badge-loss {
  background: #eef1f5;
  color: var(--cr-red);
  border: 1px solid #eef1f5;
}

.cr-result-badge-tie {
  background: #eef4fa;
  color: #1b2a4a;
  border: 1px solid #eef4fa;
}

.cr-result-score {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  font-weight: 600;
}

.cr-match-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-enter-results-link {
  font-size: 0.8rem;
  color: var(--cr-gold);
  font-weight: 600;
  text-decoration: none;
}

.cr-enter-results-link:hover { text-decoration: underline; }

/* ========================================================
   Expandable result cards (<details> + <summary>)
   ======================================================== */
.cr-result-card {
  margin-bottom: 10px;
}

.cr-result-card[open] .cr-result-caret {
  transform: rotate(180deg);
}

.cr-result-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
}

.cr-result-summary::-webkit-details-marker { display: none; }
.cr-result-summary::marker { content: ""; }

.cr-result-caret {
  color: var(--cr-text-muted);
  font-size: 0.9rem;
  margin-left: 6px;
  transition: transform 0.15s ease;
}

.cr-result-detail {
  background: #fafbfc;
  border: 1px solid var(--cr-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 12px 16px;
  margin-top: -6px;
}

.cr-result-lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.cr-result-lines th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--cr-text-muted);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--cr-border);
}

.cr-result-lines td {
  padding: 8px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
}

.cr-result-lines tr:last-child td { border-bottom: none; }

.cr-result-line-label {
  font-weight: 700;
  color: var(--cr-gold);
  width: 48px;
}

.cr-result-line-players {
  color: var(--cr-text);
}

.cr-result-line-outcome {
  white-space: nowrap;
  text-align: right;
}

.cr-result-line-score {
  display: block;
  font-variant-numeric: tabular-nums;
  color: var(--cr-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
}

/* ── Scoresheet (TennisRecord-style line breakdown) ─────────────── */
.cr-sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-sheet-line {
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cr-card);
}

.cr-sheet-line-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--cr-teal-tint, #e3f1fb);
  border-bottom: 1px solid var(--cr-border);
}

.cr-sheet-line-label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  color: var(--cr-text);
}

.cr-sheet-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
}

.cr-sheet-pair + .cr-sheet-pair {
  border-top: 1px solid #eef1f5;
}

.cr-sheet-pair-win {
  background: rgba(24, 39, 64, 0.06);
}

.cr-sheet-names {
  font-size: 0.9rem;
  color: var(--cr-text);
  line-height: 1.3;
}

.cr-sheet-pair-win .cr-sheet-names { font-weight: 700; }

.cr-sheet-playerlink {
  color: var(--cr-teal-deep);
  font-weight: 600;
  text-decoration: none;
}
.cr-sheet-playerlink:hover { text-decoration: underline; }
/* 📊 next to a name on USTA scorecards: opens that player's TennisRecord rating. */
.cr-sheet-tr-link {
  margin-left: 3px;
  font-size: 0.8em;
  text-decoration: none;
  opacity: 0.75;
}
.cr-sheet-tr-link:hover { opacity: 1; }

.cr-sheet-sets {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.cr-sheet-set {
  min-width: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--cr-text-muted);
  padding: 2px 0;
}

.cr-sheet-pair-win .cr-sheet-set { color: var(--cr-green, #1b2a4a); }

.cr-result-detail-empty {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  margin: 4px 0;
}

.cr-roster-history-link {
  font-size: 0.75rem;
  color: var(--cr-gold);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  white-space: nowrap;
}

.cr-roster-history-link:hover {
  background: rgba(24, 39, 64, 0.08);
  border-color: var(--cr-gold);
}


/* ========================================================
   Standings
   ======================================================== */

.cr-standings-own {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--cr-black);
  color: var(--cr-white);
  border-radius: 10px;
  margin-bottom: 8px;
}

.cr-standings-own-name {
  font-weight: 700;
  font-size: 1rem;
}

.cr-standings-own-record {
  display: flex;
  gap: 12px;
  font-weight: 700;
}

.cr-standings-wins { color: var(--cr-green); }
.cr-standings-losses { color: var(--cr-red); }
.cr-standings-pct { color: var(--cr-gold); }

/* ========================================================
   TennisLink-style standings table
   ======================================================== */

.cr-standings-criteria {
  font-size: 0.88rem;
  color: var(--cr-text);
  margin-bottom: 4px;
}

.cr-standings-note {
  font-size: 0.75rem;
  color: var(--cr-text-muted);
  font-style: italic;
  margin-bottom: 14px;
}

/* Horizontal scroll wrapper — lets the 8-column USTA table
   be readable on narrow mobile viewports without squashing. */
.cr-standings-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  background: var(--cr-card);
}

.cr-standings-tbl {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.cr-standings-tbl thead th {
  background: var(--cr-bg);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--cr-text-muted);
  text-align: center;
  padding: 10px 10px;
  border-bottom: 1px solid var(--cr-border);
  line-height: 1.25;
  white-space: nowrap;
}

.cr-standings-tbl tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--cr-border);
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--cr-text);
}

.cr-standings-tbl tbody tr:last-child td { border-bottom: none; }

.cr-standings-tbl .cr-standings-tbl-team {
  text-align: left;
  font-weight: 600;
  color: var(--cr-text);
  padding-left: 18px;
  white-space: nowrap;
}

.cr-standings-tbl .cr-standings-tbl-rank {
  width: 44px;
  color: var(--cr-text-muted);
}

.cr-standings-tbl .cr-standings-tbl-highlight {
  font-weight: 700;
  color: var(--cr-text);
}

.cr-standings-tbl .cr-standings-tbl-self td {
  background: var(--cr-card);
  font-weight: 700;
}

.cr-standings-tbl .cr-standings-tbl-self .cr-standings-tbl-team {
  color: var(--cr-gold);
}

.cr-standings-tbl .cr-standings-tbl-link {
  cursor: pointer;
}
.cr-standings-tbl .cr-standings-tbl-link:hover td {
  background: #fbfcfe;
}
.cr-standings-drill {
  color: var(--cr-text-light);
  font-weight: 800;
  margin-left: 6px;
}
.cr-standings-tbl .cr-standings-tbl-active td {
  background: #eef4fb;
}
.cr-standings-tbl .cr-standings-tbl-self.cr-standings-tbl-active td {
  background: #eef4fa;
}

/* Standings spotlight — the panel that opens below the table when a
   team row is tapped (roster + schedule for your team, record for opponents) */
.cr-spotlight-wrap {
  margin-top: 14px;
}
.cr-spotlight {
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  background: var(--cr-card);
  padding: 14px 16px;
}
.cr-spotlight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--cr-border);
}
.cr-spotlight-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--cr-text);
}
.cr-spotlight-record {
  font-size: 0.8rem;
  color: var(--cr-text-muted);
  font-variant-numeric: tabular-nums;
}
.cr-spotlight-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.cr-spotlight-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--cr-text-muted);
  margin-bottom: 8px;
}
.cr-spotlight-player,
.cr-spotlight-match {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--cr-border);
  font-size: 0.85rem;
}
.cr-spotlight-player:last-child,
.cr-spotlight-match:last-child {
  border-bottom: none;
}
.cr-spotlight-captain {
  color: var(--cr-gold);
  font-weight: 700;
}
.cr-spotlight-rating {
  color: var(--cr-text-muted);
  font-variant-numeric: tabular-nums;
}
.cr-spotlight-date {
  font-weight: 600;
  white-space: nowrap;
  color: var(--cr-text);
}
.cr-spotlight-opp {
  flex: 1;
  text-align: left;
  color: var(--cr-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-spotlight-score {
  white-space: nowrap;
  color: var(--cr-text-muted);
  font-variant-numeric: tabular-nums;
}
.cr-spotlight-note {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  line-height: 1.5;
  margin: 0;
}
.cr-spotlight-empty {
  font-size: 0.82rem;
  color: var(--cr-text-light);
  margin: 0;
}
@media (max-width: 560px) {
  .cr-spotlight-cols {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Legacy standings table — still used by a few places */
.cr-standings-table {
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  overflow: hidden;
}

.cr-standings-header-row {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--cr-bg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-text-muted);
  border-bottom: 1px solid var(--cr-border);
}

.cr-standings-row {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--cr-border);
  font-size: 0.9rem;
}

.cr-standings-row:last-child { border-bottom: none; }

.cr-standings-row-self {
  background: var(--cr-card);
  border-left: 3px solid var(--cr-gold);
  font-weight: 700;
}

.cr-standings-row-self .cr-standings-wins { color: var(--cr-green); }
.cr-standings-row-self .cr-standings-losses { color: var(--cr-red); }

.cr-standings-rank-col {
  width: 32px;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--cr-text-muted);
}

.cr-standings-row-self .cr-standings-rank-col { color: var(--cr-gold); font-weight: 700; }

.cr-standings-team-col {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-standings-stat-col {
  width: 48px;
  text-align: center;
  flex-shrink: 0;
  font-weight: 600;
}

.cr-standings-you-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--cr-gold);
  color: var(--cr-white);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cr-section-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-text-muted);
  margin-bottom: 8px;
}

/* ========================================================
   Captain Dashboard
   ======================================================== */

.cr-captain-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-gold);
  margin-bottom: 12px;
}

.cr-captain-match-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.cr-captain-match-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cr-border);
}

.cr-captain-match-header .cr-match-info { flex: 1; }

.cr-captain-avail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.cr-captain-avail-group {
  min-width: 0;
}

.cr-captain-avail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: inline-block;
}

.cr-captain-label-in { background: #e3f1fb; color: var(--cr-green); }
.cr-captain-label-out { background: #eef1f5; color: var(--cr-red); }
.cr-captain-label-pending { background: var(--cr-bg); color: var(--cr-text-muted); }

.cr-captain-player-row {
  font-size: 0.85rem;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-captain-player-msg {
  font-size: 0.75rem;
  color: var(--cr-text-muted);
  font-style: italic;
}

.cr-captain-player-pending { color: var(--cr-text-light); }

.cr-captain-empty {
  font-size: 0.8rem;
  color: var(--cr-text-light);
  font-style: italic;
  padding: 4px 0;
}

/* Captain analytics table */
.cr-captain-analytics-table {
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
  background: var(--cr-card);
}

/* Keep the row text dark on the white card, even on dark-themed pages
   (the team page background is navy, which was hiding the player names). */
.cr-captain-analytics-row { color: var(--cr-text); }

.cr-captain-analytics-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--cr-bg);
  border-bottom: 1px solid var(--cr-border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cr-text-muted);
}

.cr-captain-analytics-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--cr-border);
  font-size: 0.85rem;
}

.cr-captain-analytics-row:last-child { border-bottom: none; }

.cr-captain-col-name {
  flex: 1 0 130px;
  min-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-captain-col-stat {
  width: 52px;
  text-align: center;
  flex-shrink: 0;
  font-weight: 600;
}

/* ========================================================
   Landing Page
   ======================================================== */

.cr-landing {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.cr-landing-hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.cr-landing-headline {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--cr-text);
  letter-spacing: -1px;
}

.cr-landing-headline-gold {
  color: var(--cr-gold);
}

.cr-landing-tagline {
  font-size: 1.05rem;
  color: var(--cr-text-muted);
  max-width: 480px;
  margin: 16px auto 0;
  line-height: 1.6;
}

/* Six square tiles: icon on top, name, short description (computers). */
.cr-landing-features {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  max-width: 960px;
  margin: 0 auto 32px;
}

.cr-landing-feature {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 20px 10px 12px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  min-width: 0;
}

.cr-landing-feature-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.cr-landing-feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
}

.cr-landing-feature-icon svg { width: 22px; height: 22px; }

/* Feature icon colours (same as the public home page). */
.cr-landing-feature-icon.cr-tone-red{color:#1b2a4a;background:#eef1f5;}
.cr-landing-feature-icon.cr-tone-green{color:#1b2a4a;background:#e3f1fb;}
.cr-landing-feature-icon.cr-tone-blue{color:#1b2a4a;background:#e3f1fb;}
.cr-landing-feature-icon.cr-tone-lime{color:#1b2a4a;background:#e3f1fb;}
.cr-landing-feature-icon.cr-tone-orange{color:#1b2a4a;background:#eef4fa;}
.cr-landing-feature-icon.cr-tone-purple{color:#1b2a4a;background:#e3f1fb;}

.cr-landing-feature-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 1.2px;
  line-height: 1.1;
  color: var(--cr-text);
}

.cr-landing-feature-text {
  font-size: 0.72rem;
  color: var(--cr-text-muted);
  line-height: 1.35;
}

.cr-landing-signin {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.cr-landing-signin .cr-login-card {
  max-width: 420px;
  width: 100%;
}

.cr-landing-footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid var(--cr-border);
  color: var(--cr-text-muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .cr-landing { padding: 0 16px; }
  .cr-landing-hero { padding: 4px 4px 18px; }
  .cr-landing-headline { font-size: 2rem; }
  .cr-landing-tagline { font-size: 0.92rem; margin-top: 10px; }
  .cr-landing-signin { margin-bottom: 24px; }
  /* Phones: 3 x 2 small squares (icon + name) so the sign-in box stays on screen. */
  .cr-landing-features { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
  .cr-landing-feature { padding: 18px 6px 8px; }
  .cr-landing-feature-head { margin-bottom: 0; }
  .cr-landing-feature-icon { width: 38px; height: 38px; }
  .cr-landing-feature-icon svg { width: 20px; height: 20px; }
  /* Each name on one condensed line so the six tiles match the home page. */
  .cr-landing-feature-title { font-size: 0.95rem; letter-spacing: 1px; white-space: nowrap; }
  .cr-landing-feature-text { display: none; }
  .cr-landing-signin .cr-login-card { padding: 24px 20px; }
}

/* ========================================================
   Coming Soon Card
   ======================================================== */

.cr-coming-soon-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.cr-coming-soon-icon { font-size: 2.5rem; margin-bottom: 12px; }

.cr-coming-soon-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cr-text);
  margin-bottom: 12px;
}

.cr-coming-soon-text {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  line-height: 1.5;
}

.cr-coming-soon-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  text-align: left;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.cr-coming-soon-item {
  font-size: 0.85rem;
  color: var(--cr-text);
  padding: 6px 12px;
  background: var(--cr-bg);
  border-radius: 6px;
  font-weight: 500;
}

.cr-coming-soon-item::before {
  content: "✓ ";
  color: var(--cr-gold);
  font-weight: 700;
}

/* ========================================================
   Lineup Quick Facts (player profile)
   ======================================================== */

.cr-lineup-facts {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  border: 1px solid rgba(24, 39, 64, 0.35);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.cr-lineup-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 4px;
}

.cr-lineup-fact {
  background: var(--cr-card);
  border: 1px solid rgba(24, 39, 64, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
}

.cr-lineup-fact-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--cr-text-muted);
  margin-bottom: 6px;
}

.cr-lineup-fact-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cr-text);
  line-height: 1.2;
}

.cr-lineup-fact-breakdown {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--cr-text-muted);
  line-height: 1.5;
}

.cr-lineup-fact-breakdown strong {
  color: var(--cr-text);
  font-weight: 700;
}

@media (max-width: 720px) {
  .cr-lineup-facts { padding: 14px 16px; }
  .cr-lineup-facts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .cr-lineup-fact { padding: 10px 12px; }
  .cr-lineup-fact-value { font-size: 0.92rem; }
}

/* ========================================================
   Team stat charts (Player Stats tab on team show page)
   CSS horizontal bar charts — no JS dependency, data comes
   from @team_charts in teams_controller.
   ======================================================== */

.cr-chart-empty-note {
  text-align: center;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: rgba(24, 39, 64, 0.08);
  border: 1px dashed rgba(24, 39, 64, 0.4);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--cr-text-muted);
}

.cr-chart-top-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.cr-chart-summary-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  padding: 18px 20px;
}

.cr-chart-summary-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-text-muted);
  margin-bottom: 6px;
}

.cr-chart-summary-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--cr-text);
  line-height: 1;
  margin-bottom: 4px;
}

.cr-chart-summary-detail {
  font-size: 0.8rem;
  color: var(--cr-text-muted);
  margin-top: 8px;
}

.cr-chart-split-bar {
  display: flex;
  height: 26px;
  background: var(--cr-bg);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
  position: relative;
}

.cr-chart-split-left,
.cr-chart-split-right {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cr-white);
  transition: width 0.3s ease;
}

.cr-chart-split-left {
  background: linear-gradient(90deg, var(--cr-gold), var(--cr-gold-bright));
  color: var(--cr-black);
}

.cr-chart-split-right {
  flex: 1;
  background: var(--cr-black);
}

.cr-chart-section {
  margin-bottom: 28px;
}

.cr-chart-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--cr-text-muted);
  margin-bottom: 12px;
}

.cr-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-bar-row {
  display: grid;
  grid-template-columns: 42px 1fr 70px;
  gap: 12px;
  align-items: center;
}

.cr-bar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cr-text);
  text-align: right;
}

.cr-bar-label-wide {
  grid-column: 1 / span 1;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
}

.cr-bar-row:has(.cr-bar-label-wide) {
  grid-template-columns: minmax(110px, 30%) 1fr 70px;
}

.cr-bar-track {
  height: 22px;
  background: var(--cr-bg);
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.cr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cr-gold), var(--cr-gold-bright));
  border-radius: 6px 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  color: var(--cr-black);
  font-weight: 700;
  font-size: 0.72rem;
  transition: width 0.3s ease;
  min-width: 2px;
}

.cr-bar-fill-navy {
  background: linear-gradient(90deg, var(--cr-black), var(--cr-black-soft));
  color: var(--cr-white);
}

.cr-bar-fill-empty {
  background: var(--cr-bg);
}

.cr-bar-value {
  font-size: 0.78rem;
  color: var(--cr-text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
}

.cr-chart-empty-inline {
  padding: 18px;
  background: var(--cr-bg);
  border-radius: 8px;
  color: var(--cr-text-light);
  font-size: 0.82rem;
  text-align: center;
  font-style: italic;
}

.cr-chart-recent {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-chart-recent-row {
  display: grid;
  grid-template-columns: 60px 1fr 36px auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 8px;
}

.cr-chart-recent-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  text-transform: uppercase;
}

.cr-chart-recent-opponent {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cr-text);
}

.cr-chart-recent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.cr-chart-recent-win {
  background: #e3f1fb;
  color: var(--cr-green);
}

.cr-chart-recent-loss {
  background: #eef1f5;
  color: var(--cr-red);
}

.cr-chart-recent-score {
  font-size: 0.78rem;
  color: var(--cr-text-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .cr-chart-top-row { grid-template-columns: 1fr; }
  .cr-chart-summary-card { padding: 14px 16px; }
  .cr-chart-summary-value { font-size: 1.7rem; }
  .cr-bar-row { grid-template-columns: 34px 1fr 54px; gap: 8px; }
  .cr-bar-label { font-size: 0.75rem; }
  .cr-bar-label-wide { font-size: 0.78rem; }
  .cr-bar-row:has(.cr-bar-label-wide) {
    grid-template-columns: minmax(80px, 32%) 1fr 52px;
  }
  .cr-chart-recent-row { grid-template-columns: 50px 1fr 28px; }
  .cr-chart-recent-score { grid-column: 1 / -1; padding-top: 4px; }
}

/* ========================================================
   Playing Stats (player profile)
   ======================================================== */

.cr-playing-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.cr-playing-stat-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.cr-playing-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cr-gold);
  line-height: 1.1;
}

.cr-playing-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cr-text-muted);
  margin-top: 4px;
}

.cr-playing-stat-detail {
  font-size: 0.75rem;
  color: var(--cr-text-light);
  margin-top: 2px;
}

.cr-playing-stats-table {
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  overflow: hidden;
}

.cr-playing-stats-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--cr-bg);
  border-bottom: 1px solid var(--cr-border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cr-text-muted);
}

.cr-playing-stats-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--cr-border);
  font-size: 0.85rem;
}

.cr-playing-stats-row:last-child { border-bottom: none; }

.cr-ps-col-name { flex: 1; min-width: 0; }
.cr-ps-col-line { width: 48px; text-align: center; flex-shrink: 0; font-weight: 600; }
.cr-ps-col-stat { width: 64px; text-align: center; flex-shrink: 0; }
.cr-ps-col-detail { width: 120px; text-align: right; flex-shrink: 0; color: var(--cr-text-muted); font-size: 0.8rem; }

@media (max-width: 720px) {
  /* Three compact stat cards across instead of three tall stacked ones, so
     the partner and recent-match tables are much closer to the top. */
  .cr-playing-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cr-playing-stat-card { padding: 12px 6px; }
  .cr-playing-stat-value { font-size: 1.25rem; }
  .cr-playing-stat-label { font-size: 0.62rem; letter-spacing: 0.3px; }
  .cr-playing-stat-detail { font-size: 0.66rem; }
}

/* ========================================================
   Match card body (captain actions + posted lineup)

   Two layouts:
   - .cr-match-card-body (plain block, stacks naturally) — used
     when only one of the two sections is present.
   - .cr-match-card-body-split (flex row) — used when BOTH the
     captain actions and the lineup preview are rendered, so
     they sit side by side: captain on the left, lineup on the
     right. On mobile it stacks back to a single column.
   ======================================================== */

.cr-match-card-body-split {
  display: flex;
  align-items: flex-start;
}

.cr-match-card-body-split > .cr-match-captain-actions {
  flex: 0 0 170px;
  border-right: 1px solid var(--cr-border);
  background: var(--cr-card);
}

.cr-match-card-body-split > .cr-lineup-preview {
  flex: 1 1 auto;
  min-width: 0;
}

/* Captain actions (Set Lineup / Enter Results) stacked vertically
   within their column. Matches the lineup-preview background so
   the two sides of a split card feel like one continuous surface. */
.cr-match-captain-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px;
  border-top: 1px solid var(--cr-border);
  background: var(--cr-card);
}

.cr-match-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(24, 39, 64, 0.4);
  border-radius: 8px;
  background: var(--cr-card);
  color: var(--cr-text);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.cr-match-action-btn:hover {
  background: rgba(24, 39, 64, 0.08);
  border-color: var(--cr-gold);
  transform: translateY(-1px);
}

.cr-match-action-icon {
  font-size: 0.85rem;
  line-height: 1;
}

@media (max-width: 720px) {
  /* On mobile, the split layout falls back to stacked so the
     lineup preview sits below the captain actions and each
     has the full card width. Buttons get a bit more room
     since they're alone on a line. */
  .cr-match-card-body-split {
    flex-direction: column;
  }
  .cr-match-card-body-split > .cr-match-captain-actions {
    flex: 0 0 auto;
    border-right: none;
  }
  .cr-match-captain-actions {
    padding: 12px 16px;
    gap: 8px;
  }
  .cr-match-action-btn {
    padding: 9px 12px;
    font-size: 0.8rem;
  }
}

/* ========================================================
   Lineup Preview (on schedule cards)
   ======================================================== */

.cr-lineup-preview {
  padding: 16px 22px 18px;
  border-top: 1px solid var(--cr-border);
  background: var(--cr-card);
}

.cr-lineup-preview-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cr-gold);
  margin-bottom: 12px;
}

.cr-lineup-preview-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.cr-lineup-preview-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--cr-bg);
  border-radius: 8px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.cr-lineup-preview-line-label {
  font-weight: 700;
  color: var(--cr-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.8px;
  min-width: 26px;
  flex-shrink: 0;
}

.cr-lineup-preview-player {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cr-text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cr-lineup-you {
  font-weight: 700;
  color: var(--cr-gold);
}

.cr-lineup-confirmed { color: var(--cr-green); font-weight: 700; }
.cr-lineup-declined { color: var(--cr-red); font-weight: 700; }

.cr-lineup-confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--cr-card);
  border-radius: 8px;
  margin-top: 8px;
}

/* Single-column pages (forms, Set Lineup, Enter Results, uploads...) use a
   readable width instead of stretching across a wide screen (Tara: no
   hollow areas). */
.cr-page { max-width: var(--cr-col); margin: 0 auto; }

/* Lineup builder (captain page) */
.cr-lineup-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cr-lineup-line-card {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  padding: 16px 20px;
}

.cr-lineup-line-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cr-text);
}
/* Line name with the picked pair's record right beside it (wraps under it on
   narrow phones). */
.cr-lineup-line-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 10px; }
.cr-lineup-pair { font-size: 0.74rem; font-weight: 600; color: #1b2a4a; background: rgba(24, 39, 64, 0.10); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.cr-lineup-pair.is-new { color: var(--cr-text-muted); background: var(--cr-bg); }
.cr-lineup-pair[hidden] { display: none; }
/* Each player slot: the dropdown with "Already confirmed" beside it (stacked
   on phones), and last week's player for that line underneath. */
.cr-lineup-slot-row { display: grid; grid-template-columns: minmax(0, 340px) auto; justify-content: start; gap: 4px 16px; align-items: center; margin-bottom: 10px; }
.cr-lineup-slot-row .cr-select { width: 100%; }
.cr-lineup-confirmed-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--cr-text-muted); white-space: nowrap; }
.cr-lineup-last-week { grid-column: 1 / -1; font-size: 0.74rem; color: var(--cr-text-light); }
.cr-lineup-sub-name { grid-column: 1 / -1; padding: 9px 12px; border: 1px solid var(--cr-gold); border-radius: 8px; font: inherit; font-size: 0.92rem; }
.cr-lineup-sub-name[hidden] { display: none; }
/* "Most often here: Jody Staples 6 of 8 · Ann Lee 5 of 8" under each line's
   name. Each name and its count stay together when the line wraps. */
.cr-lineup-usual { margin: -4px 0 10px; font-size: 0.78rem; color: var(--cr-text-muted); line-height: 1.5; }
.cr-lineup-usual-who { white-space: nowrap; }
.cr-lineup-usual-who strong { color: var(--cr-text); font-weight: 600; }
.cr-lineup-carry { font-size: 0.85rem; color: var(--cr-text); margin: 0 0 14px; padding: 10px 14px; background: rgba(24, 39, 64, 0.10); border-left: 3px solid var(--cr-teal); border-radius: 6px; }
@media (max-width: 480px) {
  .cr-lineup-slot-row { grid-template-columns: 1fr; }
}

/* Set Lineup: the dropdown with an × to take the player off the line */
.cr-lineup-pickrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-lineup-pickrow .cr-select { flex: 1 1 auto; min-width: 0; }
.cr-lineup-clear { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cr-border); background: var(--cr-card); font-size: 1.25rem; line-height: 1; color: var(--cr-text-muted); cursor: pointer; }
.cr-lineup-clear:hover { color: #1b2a4a; border-color: #6b7688; }
.cr-lineup-actions { flex-wrap: wrap; align-items: center; }
.cr-lineup-actions .cr-btn { white-space: nowrap; }
@media (max-width: 480px) {
  .cr-lineup-actions .cr-btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 0.85rem; text-align: center; justify-content: center; }
  .cr-lineup-actions .cr-lineup-clear-all { flex-basis: 100%; margin-left: 0; text-align: center; }
}
.cr-lineup-clear-all { margin-left: auto; background: none; border: none; font: inherit; font-size: 0.88rem; font-weight: 700; color: #1b2a4a; text-decoration: underline; cursor: pointer; padding: 10px 4px; }
/* Set Lineup: tap a name, then "Put … here" (lineup_pick_controller) */
.cr-lp-panel { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.cr-lp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 10px; }
.cr-lp-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--cr-text); }
.cr-lp-hint { font-size: 0.78rem; color: var(--cr-text-muted); }
/* Every name in an equal box: two across on phones, more on wider screens. */
.cr-lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.cr-lp-chip {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 40px; padding: 0 10px;
  border: 1px solid var(--cr-border); border-radius: 8px; background: var(--cr-card);
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--cr-text); text-align: left; cursor: pointer;
}
.cr-lp-chip:hover { border-color: #c7ccd6; }
.cr-lp-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-lp-chip.is-picked { border-color: var(--cr-gold); background: rgba(24,39,64,0.12); box-shadow: inset 0 0 0 1px var(--cr-gold); }
.cr-lp-line { flex: 0 0 auto; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.3px; padding: 2px 6px; border-radius: 4px; background: var(--cr-black); color: var(--cr-white); }
.cr-lp-line[hidden] { display: none; }
.cr-lp-dot { flex: 0 0 auto; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cfd4dc; }
.cr-lp-chip.is-yes .cr-lp-dot, .cr-lp-dot.is-yes { background: #1b2a4a; }
.cr-lp-chip.is-no .cr-lp-dot, .cr-lp-dot.is-no { background: #6b7688; }
.cr-lp-chip.is-no .cr-lp-name { color: var(--cr-text-muted); }
.cr-lp-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 0.74rem; color: var(--cr-text-muted); }
.cr-lp-key > span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 600px) {
  .cr-lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Phones: full names on up to two lines, every box the same height. */
  .cr-lp-chip { gap: 6px; height: 48px; padding: 0 8px; font-size: 0.8rem; line-height: 1.2; }
  .cr-lp-name { white-space: normal; overflow-wrap: normal; word-break: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.cr-lineup-spot { grid-column: 1 / -1; min-height: 40px; border: 1.5px dashed var(--cr-gold); border-radius: 8px; background: rgba(24,39,64,0.10); font: inherit; font-size: 0.86rem; font-weight: 700; color: #1b2a4a; cursor: pointer; }
.cr-lineup-spot[hidden] { display: none; }


/* ========================================================
   My Week (upcoming matches on home page)
   ======================================================== */

.cr-my-week {
  margin-bottom: 32px;
}

.cr-my-week-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cr-text);
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.cr-my-week-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-my-week-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 8px;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cr-my-week-card:hover {
  border-color: var(--cr-gold);
  box-shadow: 0 2px 8px rgba(24, 39, 64, 0.1);
}

.cr-my-week-date {
  text-align: center;
  min-width: 40px;
  flex-shrink: 0;
}

.cr-my-week-day-name {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--cr-gold);
  letter-spacing: 0.5px;
}

.cr-my-week-month {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  letter-spacing: 0.5px;
}

.cr-my-week-day {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cr-text);
  line-height: 1.1;
}

.cr-my-week-info {
  flex: 1;
  min-width: 0;
}

.cr-my-week-league-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--cr-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cr-my-week-team {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cr-text);
  line-height: 1.2;
}

.cr-my-week-opponent {
  font-size: 0.78rem;
  color: var(--cr-text-muted);
}

.cr-my-week-detail {
  font-size: 0.7rem;
  color: var(--cr-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.cr-my-week-badge-home {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  background: #e3f1fb;
  color: #1b2a4a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cr-my-week-badge-away {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--cr-bg);
  color: var(--cr-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cr-my-week-line-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  background: #1a1a1a;
  color: #c8a415;
  letter-spacing: 0.3px;
}

/* ── Match detail page ── */
.cr-lineup-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--cr-bg);
  border: 1px solid var(--cr-border);
  border-radius: 10px 10px 0 0;
  border-bottom: 3px solid var(--cr-gold);
}

.cr-lineup-confirm-prompt {
  margin-top: 16px;
  padding: 14px 18px;
  background: #eef4fa;
  border: 1px solid #eef4fa;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.cr-lineup-table {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  overflow: hidden;
}

.cr-lineup-table-header {
  display: grid;
  grid-template-columns: 80px 50px 1fr 120px;
  padding: 10px 18px;
  background: var(--cr-bg);
  border-bottom: 2px solid var(--cr-border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cr-text-muted);
}

.cr-lineup-table-row {
  display: grid;
  grid-template-columns: 80px 50px 1fr 120px;
  padding: 10px 18px;
  font-size: 0.9rem;
  align-items: center;
}

.cr-lineup-line-group {
  border-bottom: 1px solid var(--cr-border);
}

.cr-lineup-line-group:last-child { border-bottom: none; }

.cr-lineup-table-row:last-child { border-bottom: none; }

.cr-lineup-row-you {
  background: rgba(24, 39, 64, 0.05);
}

.cr-lineup-col-time { color: var(--cr-text); }
.cr-lineup-col-line { color: var(--cr-text); }
.cr-lineup-col-player { color: var(--cr-text); font-weight: 600; }

.cr-lineup-status-confirmed { color: var(--cr-green); font-weight: 600; font-size: 0.82rem; }
.cr-lineup-status-declined { color: var(--cr-red); font-weight: 600; font-size: 0.82rem; }
.cr-lineup-status-pending { color: var(--cr-text-light); font-style: italic; font-size: 0.82rem; }

/* Mobile: stack the lineup table columns so the full lineup is readable on narrow screens */
@media (max-width: 720px) {
  .cr-lineup-match-header {
    flex-wrap: wrap;
    gap: 10px !important;
    padding: 14px !important;
  }
  .cr-lineup-table-header {
    grid-template-columns: 60px 42px 1fr 90px;
    padding: 8px 12px;
    font-size: 0.62rem;
  }
  .cr-lineup-table-row {
    grid-template-columns: 60px 42px 1fr 90px;
    padding: 10px 12px;
    font-size: 0.82rem;
    gap: 4px;
  }
  .cr-lineup-col-player { word-break: break-word; }
  .cr-lineup-status-confirmed,
  .cr-lineup-status-declined,
  .cr-lineup-status-pending {
    font-size: 0.68rem;
  }
  .cr-lineup-confirm-prompt {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* "Set Lineup" button on match detail page — compact on mobile */
  .cr-set-lineup-btn {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Team show page match cards — slight mobile polish over the
     main desktop rules. Just tightens padding and font sizes,
     keeps the same vertical column structure. */
  .cr-match-card .cr-match-row {
    padding: 14px 16px;
    gap: 12px;
  }
  .cr-match-card .cr-match-date {
    min-width: 54px;
    padding: 8px 10px;
  }
  .cr-match-card .cr-match-date-day {
    font-size: 1.3rem;
  }
  .cr-match-card .cr-match-opponent {
    font-size: 0.95rem;
  }
  .cr-match-card .cr-match-location {
    font-size: 0.75rem;
  }
  .cr-match-card .cr-match-badge {
    font-size: 0.62rem;
    padding: 2px 8px;
  }
  .cr-match-card .cr-cal-btn {
    width: 30px;
    height: 30px;
  }
  .cr-lineup-preview {
    padding: 14px 16px 16px;
  }
  .cr-lineup-preview-line {
    font-size: 0.82rem;
    padding: 7px 10px;
    gap: 10px;
  }
  .cr-lineup-preview-player {
    font-size: 0.82rem;
  }
}

.cr-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--cr-bg);
  border: 1px solid var(--cr-border);
  color: var(--cr-text-muted);
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
.cr-cal-btn:hover {
  background: var(--cr-gold);
  color: var(--cr-black);
  border-color: var(--cr-gold);
}

/* ========================================================
   Responsive
   ======================================================== */

@media (max-width: 720px) {
  .cr-header-inner { padding: 10px 12px; gap: 6px; flex-wrap: nowrap; }
  .cr-brand { gap: 8px; min-width: 0; flex-shrink: 1; }
  .cr-brand-text {
    font-size: 1.1rem;
    letter-spacing: 1.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cr-brand-ball { width: 32px; height: 32px; font-size: 0.95rem; border-radius: 7px; }
  .cr-header-right { gap: 6px; flex-shrink: 0; flex-wrap: nowrap; }
  .cr-header-pill,
  button.cr-header-pill {
    padding: 5px 10px;
    font-size: 0.62rem;
    letter-spacing: 0.2px;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
  /* Hide user name and "My Teams" pill on mobile. Users can still navigate
     via the logo click (which goes to /teams when logged in) or the bottom
     nav bar. Keeps the header uncluttered on narrow viewports. */
  .cr-header-user,
  .cr-user-menu,
  .cr-header-search,
  .cr-header-my-teams { display: none !important; }
  .cr-header-search-icon { display: inline-flex !important; }
  .cr-main { padding: 24px 16px 110px; }
  .cr-page-title { font-size: 1.6rem; }
  .cr-team-hero { padding: 24px; }
  .cr-team-hero-name { font-size: 1.8rem; }
}

/* ========================================================
   Bottom Nav (mobile only) — matches marketing page bnav
   ======================================================== */

.cr-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.97), var(--cr-black));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(24, 39, 64, 0.15);
  padding: 0 0 env(safe-area-inset-bottom);
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.cr-bottom-nav-inner {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  pointer-events: auto;
}

.cr-bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px 10px;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: rgba(24, 39, 64, 0.2);
  text-decoration: none;
  font-family: inherit;
  pointer-events: auto;
  touch-action: manipulation;
  min-height: 48px;
}

.cr-bnav-btn > * {
  pointer-events: none;
}

.cr-bnav-btn:active { transform: scale(0.92); }

.cr-bnav-active { color: var(--cr-gold); }
.cr-bnav-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cr-gold), transparent);
  border-radius: 0 0 2px 2px;
}

.cr-bnav-icon {
  font-size: 1.4rem;
  line-height: 1;
  filter: grayscale(20%);
  transition: filter 0.2s, transform 0.2s;
}
.cr-bnav-active .cr-bnav-icon {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.cr-bnav-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.52rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .cr-bottom-nav { display: block; }

  /* On mobile, the bottom nav already covers Schedule / Standings /
     Roster navigation, so the per-team sub-tabs at the top of the
     team show page are redundant. Hide the sub-tab strip and show
     ALL panels stacked vertically so nothing becomes unreachable
     (Availability / Player Stats / Captain Dashboard still get
     rendered, just one after another down the page). */
  .cr-subtabs { display: none !important; }

  [data-controller="team-tabs"] [data-team-tabs-target="panel"] {
    display: block !important;
    margin-bottom: 28px;
  }

  [data-controller="team-tabs"] [data-team-tabs-target="panel"]:last-of-type {
    margin-bottom: 0;
  }
}

@media (max-width: 380px) {
  .cr-bnav-label { font-size: 0.45rem; }
  .cr-brand-text { font-size: 1.2rem; letter-spacing: 1.5px; }
  .cr-brand-ball { width: 30px; height: 30px; font-size: 0.9rem; }
  .cr-header-pill,
  button.cr-header-pill {
    padding: 4px 8px;
    font-size: 0.58rem;
  }
}

/* ========================================================
   Home page: Coming Up cards + month calendar (two-column)
   ======================================================== */

.cr-home-top {
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(260px, 400px);
  gap: 24px;
  margin: 0 auto 32px;           /* center the grid inside .cr-main */
  max-width: 824px;              /* 2 × 400 + 24 gap — clean balanced panel */
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;              /* safety net so nothing can push wider */
}

.cr-home-left,
.cr-home-right { min-width: 0; }

/* Compact card overrides (smaller than the default .cr-my-week-card) */
.cr-my-week-list-compact { gap: 6px; }

.cr-my-week-card-compact {
  padding: 8px 12px;
  gap: 10px;
}

.cr-my-week-card-compact .cr-my-week-day-name,
.cr-my-week-card-compact .cr-my-week-month {
  font-size: 0.5rem;
}

.cr-my-week-card-compact .cr-my-week-day      { font-size: 1.05rem; }
.cr-my-week-card-compact .cr-my-week-team     { font-size: 0.8rem; }
.cr-my-week-card-compact .cr-my-week-opponent { font-size: 0.72rem; }
.cr-my-week-card-compact .cr-my-week-detail   { font-size: 0.65rem; gap: 5px; }

/* Right rail: stack Google-Cal button above line-position badge */
.cr-my-week-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cr-my-week-right .cr-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  color: var(--cr-text-muted);
  background: var(--cr-card);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.cr-my-week-right .cr-cal-btn:hover {
  border-color: var(--cr-gold);
  color: var(--cr-gold);
}

.cr-coming-up-empty {
  padding: 14px 16px;
  background: var(--cr-card);
  border: 1px dashed var(--cr-border);
  border-radius: 8px;
  color: var(--cr-text-muted);
  font-size: 0.85rem;
}

/* ── "See Full Schedule" button under the Coming Up list ── */
.cr-see-full-schedule-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 8px;
  color: var(--cr-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cr-see-full-schedule-btn:hover {
  border-color: var(--cr-gold);
  color: var(--cr-gold);
  background: var(--cr-card);
}

/* ── Full schedule popup modal ── */
.cr-full-schedule-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cr-full-schedule-modal-panel {
  position: relative;
  background: var(--cr-card);
  border-radius: 14px;
  padding: 22px 22px 18px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.cr-full-schedule-modal-title {
  margin: 0 0 16px;
  padding-right: 36px;   /* leave room for the X button */
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cr-text);
  letter-spacing: 0.3px;
}

.cr-full-schedule-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--cr-border);
  border-radius: 999px;
  background: var(--cr-card);
  color: var(--cr-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cr-full-schedule-modal-close:hover {
  border-color: var(--cr-gold);
  color: var(--cr-gold);
  background: var(--cr-card);
}

.cr-full-schedule-modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  padding-right: 4px;    /* breathing room next to the scrollbar */
}

/* ── Dashboard month calendar ── */
.cr-dash-cal {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  padding: 12px 14px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  max-width: 100%;
  /* Push the calendar panel down so its top edge aligns with the first
     card on the left. The left column starts with "Coming Up" (h2 ~26px
     tall + 12px margin-bottom = 38px), so we match that here. */
  margin: 38px auto 0;
}

.cr-dash-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cr-dash-cal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cr-text);
  margin: 0;
  letter-spacing: 0.3px;
}

.cr-dash-cal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  color: var(--cr-text);
  background: var(--cr-card);
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
}

.cr-dash-cal-nav:hover {
  border-color: var(--cr-gold);
  color: var(--cr-gold);
}

.cr-dash-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.cr-dash-cal-weekdays span {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--cr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cr-dash-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cr-dash-cal-day {
  position: relative;
  /* Explicit compact height. NO aspect-ratio — that was causing the grid
     to balloon on wide viewports because aspect-ratio made square cells
     as wide as the 1fr column, which pushed the page past the viewport. */
  height: 44px;
  min-width: 0;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  background: var(--cr-card);
  color: var(--cr-text);
  font: inherit;
  padding: 3px 3px 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}

.cr-dash-cal-day:hover {
  border-color: var(--cr-gold);
  background: var(--cr-card);
}

.cr-dash-cal-day:active {
  transform: scale(0.97);
}

.cr-dash-cal-day-blank {
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.cr-dash-cal-day-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cr-text);
  line-height: 1;
}

.cr-dash-cal-day-today {
  border: 2px solid var(--cr-gold);
  background: var(--cr-card);
}

.cr-dash-cal-day-today .cr-dash-cal-day-num {
  color: var(--cr-gold);
}

.cr-dash-cal-day-match {
  background: var(--cr-black);
  color: var(--cr-gold-bright);
  border-color: var(--cr-black);
}

.cr-dash-cal-day-match .cr-dash-cal-day-num {
  color: var(--cr-gold-bright);
}

.cr-dash-cal-day-match:hover {
  background: var(--cr-black-soft);
  border-color: var(--cr-gold);
}

.cr-dash-cal-day-event {
  background: var(--cr-card);
  border-color: #eef4fa;
}

.cr-dash-cal-day-dots {
  margin-top: auto;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 100%;
  align-self: center;
  padding-bottom: 2px;
}

.cr-dash-cal-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--cr-text-muted);
}

.cr-dash-cal-dot-match    { background: var(--cr-gold); }
.cr-dash-cal-dot-practice { background: #1b2a4a; }
.cr-dash-cal-dot-clinic   { background: #1b2a4a; }
.cr-dash-cal-dot-friendly { background: #7d8899; }
.cr-dash-cal-dot-other    { background: #1b2a4a; }

.cr-dash-cal-legend {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  font-size: 0.62rem;
  color: var(--cr-text-muted);
  flex-wrap: wrap;
}

.cr-dash-cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Modal ── */
.cr-dash-cal-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cr-dash-cal-modal-open {
  display: flex;
}

.cr-dash-cal-modal-panel {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-top: 4px solid var(--cr-gold);
  border-radius: 12px;
  padding: 20px 22px 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.cr-dash-cal-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--cr-text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.cr-dash-cal-modal-close:hover { color: var(--cr-text); }

.cr-dash-cal-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cr-text);
  margin: 0 0 14px;
  padding-right: 24px;
}

.cr-dash-cal-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cr-dash-cal-modal-empty {
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  margin: 0;
}

.cr-dash-cal-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--cr-border);
  border-radius: 8px;
  background: var(--cr-card);
  color: var(--cr-text);
  text-decoration: none;
  transition: border-color 0.15s;
}

.cr-dash-cal-item:hover {
  border-color: var(--cr-gold);
}

.cr-dash-cal-item-match {
  border-left: 3px solid var(--cr-gold);
}

.cr-dash-cal-item-practice { border-left: 3px solid #1b2a4a; }
.cr-dash-cal-item-clinic   { border-left: 3px solid #1b2a4a; }
.cr-dash-cal-item-friendly { border-left: 3px solid #7d8899; }
.cr-dash-cal-item-other    { border-left: 3px solid #1b2a4a; }

.cr-dash-cal-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.cr-dash-cal-item-kind {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-gold);
}

.cr-dash-cal-item-team {
  font-size: 0.62rem;
  color: var(--cr-text-muted);
  font-weight: 600;
}

.cr-dash-cal-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cr-text);
  margin-bottom: 2px;
}

.cr-dash-cal-item-meta {
  font-size: 0.72rem;
  color: var(--cr-text-muted);
}

.cr-dash-cal-item-view {
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cr-gold);
}

/* Add form inside modal */
.cr-dash-cal-modal-add {
  border-top: 1px solid var(--cr-border);
  padding-top: 14px;
  margin-top: 6px;
}

.cr-dash-cal-modal-add-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cr-text-muted);
  margin: 0 0 10px;
}

.cr-dash-cal-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-dash-cal-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--cr-text);
}

.cr-dash-cal-form-row > span {
  width: 70px;
  font-weight: 600;
  color: var(--cr-text-muted);
  flex-shrink: 0;
}

.cr-dash-cal-form-row select,
.cr-dash-cal-form-row input[type="text"] {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--cr-border);
  border-radius: 6px;
  font-size: 0.82rem;
  background: var(--cr-card);
  color: var(--cr-text);
  min-width: 0;
}

.cr-dash-cal-form-row select:focus,
.cr-dash-cal-form-row input[type="text"]:focus {
  outline: none;
  border-color: var(--cr-gold);
}

.cr-dash-cal-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.cr-btn-compact {
  padding: 7px 18px;
  font-size: 0.78rem;
}

.cr-dash-cal-modal-captain-note {
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--cr-bg);
  border-radius: 6px;
  color: var(--cr-text-muted);
  font-size: 0.72rem;
  font-style: italic;
}

/* Mobile: stack the left cards on top, calendar underneath */
@media (max-width: 860px) {
  .cr-home-top {
    grid-template-columns: 1fr;
  }

  .cr-dash-cal-day {
    min-height: 30px;
    padding: 3px 2px 2px;
  }

  .cr-dash-cal-day-num { font-size: 0.68rem; }

  .cr-dash-cal-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .cr-dash-cal-form-row > span {
    width: auto;
  }

  .cr-dash-cal-form-row select,
  .cr-dash-cal-form-row input[type="text"] {
    width: 100%;
  }
}

/* ── Admin reset bypass box on login page ── */
.cr-admin-reset-box {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--cr-card);
  border: 1px solid #eef4fa;
  border-left: 4px solid var(--cr-gold);
  border-radius: 8px;
}

.cr-admin-reset-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--cr-gold);
  margin-bottom: 4px;
}

.cr-admin-reset-note {
  font-size: 0.78rem;
  color: var(--cr-text);
  margin: 0 0 10px;
}

.cr-admin-reset-btn {
  display: inline-block;
  font-size: 0.85rem;
  padding: 8px 16px;
}

/* ============================================================
   Team page refresh — inviting, readable, mobile-first
   (Appended last so it refines the rules above via the cascade.
    Self-contained; remove this block to revert.)
   ============================================================ */

.cr-team-page { padding-bottom: 48px; }

/* — Hero: confident, not shouting — */
.cr-team-hero {
  border-radius: 20px;
  padding: 30px 32px;
  background: linear-gradient(135deg, #0c1c34 0%, #15294a 100%);
  box-shadow: 0 14px 34px rgba(10, 22, 40, 0.20);
}
.cr-team-hero-label { letter-spacing: 1.4px; color: var(--cr-gold-soft); }
.cr-team-hero-name {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: none;
  line-height: 1.12;
}
.cr-team-hero-sub { font-size: 0.9rem; line-height: 1.55; }
.cr-team-hero-stats { gap: 28px; margin-top: 22px; }
.cr-hero-stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: 0.3px; }
.cr-hero-stat-label { font-size: 0.62rem; letter-spacing: 1.2px; color: rgba(255,255,255,0.55); }

/* — Stat cards: soft, consistent, subtle gold accent — */
.cr-stat-cards { gap: 12px; margin-bottom: 28px; }
.cr-stat-card {
  border: 1px solid var(--cr-border);
  border-top: 2px solid rgba(24, 39, 64, 0.55);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.04);
}
.cr-stat-card-value { font-size: 1.7rem; font-weight: 800; }
.cr-stat-card-label { font-size: 0.64rem; letter-spacing: 1.1px; color: var(--cr-text-light); margin-top: 5px; }

/* — Sub-tabs: scrollable + comfortable on mobile — */
.cr-subtabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
  gap: 2px;
}
.cr-subtabs::-webkit-scrollbar { display: none; }
.cr-subtab { padding: 12px 16px; font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }

.cr-section-title { font-size: 0.74rem; letter-spacing: 1.4px; color: var(--cr-text-muted); }

/* — Match cards: airy, soft, readable — */
.cr-match-card { border-radius: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(10,22,40,0.04); }
.cr-match-card:hover { box-shadow: 0 8px 22px rgba(10,22,40,0.08); }
.cr-match-card .cr-match-row { padding: 16px 18px; gap: 14px; }
.cr-match-card .cr-match-date { border-radius: 12px; min-width: 58px; }
.cr-match-card .cr-match-opponent { font-size: 1.02rem; line-height: 1.3; }
.cr-match-card .cr-match-location { font-size: 0.8rem; margin-top: 3px; }
.cr-match-result-row { display: inline-flex; align-items: center; gap: 8px; }

/* — Badges: soft pills — */
.cr-match-badge { border-radius: 999px; padding: 4px 11px; font-size: 0.64rem; }
.cr-match-home { background: rgba(24, 39, 64,0.10); color: #1b2a4a; }
.cr-match-away { background: var(--cr-bg); color: var(--cr-text-muted); }
.cr-result-badge { border-radius: 999px; padding: 3px 11px; font-weight: 700; }
.cr-result-badge-win  { background: rgba(24, 39, 64,0.12); color: #1b2a4a; }
.cr-result-badge-loss { background: rgba(107, 118, 136,0.10); color: #1b2a4a; }
.cr-result-badge-tie  { background: rgba(24,39,64,0.14); color: #1b2a4a; }
.cr-result-score { color: var(--cr-text-muted); font-weight: 700; }

/* — Captain actions: clean full-width pill row (stack the split) — */
.cr-match-card-body-split { flex-direction: column; }
.cr-match-card-body-split > .cr-match-captain-actions { border-right: none; flex: 0 0 auto; }
.cr-match-captain-actions {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--cr-bg);
  padding: 12px 16px;
}
.cr-match-action-btn {
  width: auto;
  flex: 1 1 auto;
  min-width: 118px;
  border-radius: 999px;
  border-color: var(--cr-border);
  font-size: 0.78rem;
  padding: 9px 14px;
}

/* — Lineup preview: clean chips — */
.cr-lineup-preview { background: var(--cr-bg); }
.cr-lineup-preview-title { color: var(--cr-text-muted); letter-spacing: 1.2px; }
.cr-lineup-preview-line {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  padding: 9px 12px;
}
.cr-lineup-preview-line-label {
  background: var(--cr-black);
  color: var(--cr-gold-soft);
  border-radius: 6px;
  padding: 3px 8px;
  min-width: 30px;
  text-align: center;
}

/* — Mobile: inviting, easy to tap & read — */
@media (max-width: 720px) {
  .cr-team-hero { padding: 22px 20px; border-radius: 16px; }
  .cr-team-hero-name { font-size: 1.6rem; }
  .cr-team-hero-sub { font-size: 0.85rem; }
  .cr-team-hero-stats { gap: 22px; margin-top: 18px; }
  .cr-hero-stat-value { font-size: 1.45rem; }

  .cr-stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cr-stat-card { padding: 14px 12px; }
  .cr-stat-card-value { font-size: 1.55rem; }

  .cr-match-card .cr-match-row { padding: 14px; gap: 12px; }
  .cr-match-captain-actions { padding: 12px; }
  .cr-match-action-btn { min-width: 0; flex: 1 1 31%; padding: 11px 8px; font-size: 0.74rem; }
  .cr-cal-btn { width: 34px; height: 34px; }
}

/* ============================================================
   Home dashboard — tabbed Standings / Calendar / Coming Up
   (Court Report colors. Works as real tabs on mobile too.)
   ============================================================ */

.cr-home-subtitle { color: var(--cr-text-muted); font-size: 0.9rem; margin-top: 4px; }

/* My Teams tabs: one even segmented control, every tab visible on a phone. */
.cr-home-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  background: #e6ebf2;
  border: 1px solid var(--cr-teal);
  border-radius: 12px;
  max-width: var(--cr-col);
}
.cr-home-tab {
  min-width: 0;
  min-height: 40px;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: var(--cr-teal-deep);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.cr-home-tab:hover { background: rgba(24, 39, 64, 0.10); }
.cr-home-tab-active,
.cr-home-tab-active:hover {
  color: var(--cr-teal-deep);
  font-weight: 700;
  background: var(--cr-card);
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.10), 0 1px 6px rgba(10, 22, 40, 0.06);
}

/* — Standings table — */
.cr-standings-wrap {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.04);
}
.cr-standings { width: 100%; border-collapse: collapse; }
.cr-standings thead th {
  text-align: left;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cr-text-light);
  padding: 14px 16px;
  border-bottom: 1px solid var(--cr-border);
  white-space: nowrap;
}
.cr-standings tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cr-border);
  vertical-align: middle;
  font-size: 0.92rem;
  color: var(--cr-text);
}
.cr-standings tbody tr:last-child td { border-bottom: none; }
.cr-st-row { cursor: pointer; transition: background 0.12s; }
.cr-st-row:hover td { background: rgba(24, 39, 64, 0.06); }

.cr-st-n { text-align: center; white-space: nowrap; }
/* W and L column headings are a green and a red circle. */
.cr-standings thead th .cr-st-dot { margin: 0 auto; }
.cr-st-rank { color: var(--cr-text-light); font-weight: 800; width: 40px; }
.cr-st-team { color: var(--cr-text); font-weight: 700; font-size: 0.98rem; text-decoration: none; }
.cr-st-team:hover { color: var(--cr-gold); }
.cr-st-sub { color: var(--cr-text-muted); font-size: 0.76rem; margin-top: 2px; }
.cr-st-w { color: var(--cr-green); font-weight: 700; }
.cr-st-l { color: var(--cr-red); font-weight: 700; }
.cr-st-muted { color: var(--cr-text-light); }
.cr-st-next { color: var(--cr-text-muted); font-size: 0.86rem; white-space: nowrap; }
.cr-st-next-date { color: var(--cr-text); font-weight: 600; }

.cr-st-form { display: flex; gap: 5px; }
.cr-st-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 0.66rem; font-weight: 800; color: #fff;
}
.cr-st-dot-w { background: var(--cr-green); }
.cr-st-dot-l { background: var(--cr-red); }
.cr-st-dot-t { background: var(--cr-gold); color: var(--cr-black); }

.cr-st-hint { color: var(--cr-text-light); font-size: 0.78rem; margin-top: 12px; text-align: center; }

/* Center the calendar within its tab (it used to share a 2-col row) */
.cr-dash-cal-full { max-width: var(--cr-col); margin: 0 auto; position: relative; }

/* Month calendar with each day's events written in the day (like a phone
   calendar app). Mouse: hover a day for its schedule, click a name to open it.
   Touch: tap a day for the full list. */
.cr-dash-cal-full .cr-dash-cal-grid { gap: 3px; }
.cr-dash-cal-full .cr-dash-cal-day {
  height: auto; min-height: 96px; padding: 4px 4px 5px; gap: 2px;
  align-items: stretch; overflow: hidden; background: var(--cr-card); color: var(--cr-text); border-color: var(--cr-border);
}
.cr-dash-cal-full .cr-dash-cal-day-blank { background: transparent; }
.cr-dash-cal-full .cr-dash-cal-day-num {
  align-self: flex-end; display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 3px; border-radius: 999px; font-size: 0.74rem; color: var(--cr-text);
}
.cr-dash-cal-full .cr-dash-cal-day-today { border: 2px solid var(--cr-gold); background: var(--cr-card); }
.cr-dash-cal-full .cr-dash-cal-day-today .cr-dash-cal-day-num { background: var(--cr-gold); color: var(--cr-black); }
.cr-dash-cal-chip {
  display: block; width: 100%; min-width: 0; padding: 2px 5px; border-left: 3px solid var(--cr-text-muted); border-radius: 4px;
  font-size: 0.7rem; font-weight: 600; line-height: 1.3; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cr-dash-cal-chip-match    { background: var(--cr-black); color: var(--cr-gold-bright); border-left-color: var(--cr-gold); }
.cr-dash-cal-chip-practice { background: #e3f1fb; color: #1b2a4a; border-left-color: #1b2a4a; }
.cr-dash-cal-chip-clinic   { background: #e3f1fb; color: #1b2a4a; border-left-color: #1b2a4a; }
.cr-dash-cal-chip-friendly { background: #eef4fa; color: #1b2a4a; border-left-color: #7d8899; }
.cr-dash-cal-chip-other    { background: #e3f1fb; color: #1b2a4a; border-left-color: #1b2a4a; }
.cr-dash-cal-form-other[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cr-dash-cal-chip[data-url]:hover { text-decoration: underline; }
}
.cr-dash-cal-more { font-size: 0.64rem; font-weight: 700; color: var(--cr-text-muted); text-align: left; padding-left: 4px; }

.cr-dash-cal-hover {
  position: absolute; z-index: 300; width: 290px; max-height: 380px; overflow-y: auto;
  padding: 12px; background: var(--cr-card); border: 1px solid var(--cr-border); border-top: 4px solid var(--cr-gold);
  border-radius: 12px; box-shadow: 0 12px 34px rgba(24, 39, 64, 0.22);
}
.cr-dash-cal-hover[hidden] { display: none; }
.cr-dash-cal-hover-title { font-size: 0.86rem; font-weight: 800; color: var(--cr-text); margin: 0 0 8px; }
.cr-dash-cal-hover-body { display: flex; flex-direction: column; gap: 6px; }
.cr-dash-cal-hover .cr-dash-cal-item { padding: 7px 10px; }
.cr-dash-cal-hover .cr-dash-cal-item-title { font-size: 0.84rem; }
.cr-dash-cal-hover .cr-dash-cal-item-view { margin-top: 3px; }
/* Calendar items: the whole card opens the match (a stretched link); the
   team name on top is its own link to the team page. */
.cr-dash-cal-item { position: relative; }
a.cr-dash-cal-item-title { display: block; color: var(--cr-text); text-decoration: none; }
.cr-dash-cal-item-stretch::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.cr-dash-cal-item-teamlink { position: relative; z-index: 1; text-decoration: none; }
.cr-dash-cal-item-teamlink:hover { color: var(--cr-teal-deep); text-decoration: underline; }

@media (max-width: 640px) {
  .cr-dash-cal-full { padding: 10px 6px 12px; }
  .cr-dash-cal-full .cr-dash-cal-grid { gap: 2px; }
  .cr-dash-cal-full .cr-dash-cal-day { min-height: 76px; padding: 2px 1px 3px; gap: 2px; border-radius: 4px; }
  .cr-dash-cal-full .cr-dash-cal-day-num { font-size: 0.68rem; min-width: 18px; height: 18px; }
  .cr-dash-cal-chip { padding: 1px 2px; border-left-width: 2px; border-radius: 2px; font-size: 0.56rem; text-overflow: clip; }
  .cr-dash-cal-more { font-size: 0.55rem; padding-left: 1px; }
}

/* Mobile: trim lower-priority columns so the table stays clean & readable */
@media (max-width: 640px) {
  .cr-standings thead th:nth-child(5), .cr-standings tbody td:nth-child(5),  /* Win% */
  .cr-standings thead th:nth-child(6), .cr-standings tbody td:nth-child(6) { /* Next */
    display: none;
  }
  .cr-standings thead th, .cr-standings tbody td { padding: 13px 10px; }
  .cr-st-dot { width: 20px; height: 20px; font-size: 0.6rem; }
  .cr-home-tab { font-size: 0.8rem; }
}

/* ============================================================
   Home dashboard — high-end color polish (navy + gold palette)
   ============================================================ */


/* Premium framing on the standings card */
.cr-standings-wrap {
  border-color: rgba(24, 39, 64, 0.22);
  box-shadow: 0 10px 30px rgba(10, 22, 40, 0.07);
}

/* Navy header bar with gold underline */
.cr-standings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: linear-gradient(135deg, #0c1c34 0%, #16294a 100%);
  border-bottom: 2px solid var(--cr-gold);
}
.cr-standings-head-title { color: var(--cr-white); font-weight: 800; font-size: 0.98rem; letter-spacing: 0.3px; }
.cr-standings-head-season { color: var(--cr-gold-soft); font-weight: 700; font-size: 0.68rem; letter-spacing: 1.4px; text-transform: uppercase; }

/* League section heading rows inside the My Teams standings table */
.cr-st-league td {
  padding: 12px 14px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cr-gold);
  border-bottom: 1px solid rgba(24, 39, 64, 0.35);
  background: transparent;
  cursor: default;
}

/* Subtle gold tint on the column header row */
.cr-standings thead th { background: rgba(24, 39, 64, 0.06); }

/* Rank medallions — gold for the leader */
.cr-st-rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--cr-bg); border: 1px solid var(--cr-border);
  color: var(--cr-text-muted); font-weight: 800; font-size: 0.78rem;
}
.cr-standings tbody tr.cr-st-row:first-child .cr-st-rank-badge {
  background: linear-gradient(135deg, var(--cr-gold-bright), var(--cr-gold));
  border-color: var(--cr-gold);
  color: var(--cr-black);
  box-shadow: 0 2px 8px rgba(24, 39, 64, 0.45);
}

/* Leader row: soft gold tint + gold left accent */
.cr-standings tbody tr.cr-st-row:first-child td { background: rgba(24, 39, 64, 0.07); }
.cr-standings tbody tr.cr-st-row:first-child td:first-child { box-shadow: inset 3px 0 0 var(--cr-gold); }

/* Win% color-coded */
.cr-st-pct-good { color: var(--cr-green); font-weight: 800; }
.cr-st-pct-bad  { color: var(--cr-red);   font-weight: 800; }

/* Form dots — a touch of depth */
.cr-st-dot { box-shadow: 0 1px 2px rgba(10, 22, 40, 0.18); }

/* ============================================================
   Home standings — warm-white listings + soft pastel W/L circles
   (Final tone pass per Tara: ivory rows, warmer form dots)
   ============================================================ */

/* Warm white (ivory) team listings instead of stark white */
.cr-standings-wrap { background: var(--cr-card); }
.cr-standings thead th { background: rgba(24, 39, 64, 0.10); }
.cr-standings tbody td { border-bottom-color: rgba(10, 22, 40, 0.06); }
.cr-st-row:hover td { background: rgba(24, 39, 64, 0.12); }
.cr-standings tbody tr.cr-st-row:first-child td { background: rgba(24, 39, 64, 0.13); }

/* Lighter, warmer W/L circles (soft mint / soft rose, dark text) */
.cr-st-dot { box-shadow: none; font-weight: 800; }
.cr-st-dot-w { background: #e3f1fb; color: #1b2a4a; }
.cr-st-dot-l { background: #d5dbe4; color: #1b2a4a; }
.cr-st-dot-t { background: #7d8899; color: #5c4708; }

/* Rank medallion on ivory — keep it crisp */
.cr-st-rank-badge { background: var(--cr-card); }

/* One solid, warm page background (ivory listings sit on top as a panel) */
body { background: #eef6fd; }

/* ============================================================
   Dark home page (My Teams) — dark navy canvas, light data panels.
   Scoped to the home page via the body context class so other
   pages stay on the light theme until we extend it deliberately.
   ============================================================ */
body.cr-ctx-teams-index { background: var(--cr-navy-page); }
body.cr-ctx-teams-index .cr-page-title { color: var(--cr-text); }
body.cr-ctx-teams-index .cr-home-subtitle { color: var(--cr-text-muted); }
body.cr-ctx-teams-index .cr-st-hint { color: var(--cr-text-muted); }
body.cr-ctx-teams-index .cr-coming-up-empty { color: var(--cr-text-muted); }

/* Page-header action buttons — smaller, cleaner pills. Scoped to the header
   row so it wins over both stylesheets' generic .cr-btn / .cr-btn-outline. */
.cr-page-header-actions .cr-btn {
  padding: 6px 13px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 7px;
  letter-spacing: 0.2px;
  line-height: 1.25;
}
.cr-page-header-actions .cr-btn-outline {
  border-width: 1px;
}

/* ============================================================
   Dark team page (scoped). Dark canvas; hero + light cards on top.
   ============================================================ */
body.cr-ctx-teams-show { background: var(--cr-navy-page); }
body.cr-ctx-teams-show .cr-back-link a { color: var(--cr-text-muted); }
body.cr-ctx-teams-show .cr-back-link a:hover { color: var(--cr-gold); }
body.cr-ctx-teams-show .cr-section-title { color: var(--cr-text); border-bottom-color: rgba(10, 22, 40, 0.12); }
body.cr-ctx-teams-show .cr-subtabs { border-bottom-color: rgba(10, 22, 40, 0.12); }
body.cr-ctx-teams-show .cr-subtab { color: var(--cr-text-muted); }
body.cr-ctx-teams-show .cr-subtab:hover { color: var(--cr-text); }
body.cr-ctx-teams-show .cr-subtab-active { color: var(--cr-text); }
body.cr-ctx-teams-show .cr-empty { color: var(--cr-text-muted); }
body.cr-ctx-teams-show .cr-team-hero { border: 1px solid rgba(24, 39, 64, 0.18); }

/* ============================================================
   Dark theme: Profile / Lineups / Find-a-Team (scoped, previewed)
   ============================================================ */
body.cr-ctx-profiles-show,
body.cr-ctx-lineups-dashboard,
body.cr-ctx-teams-search { background: var(--cr-navy-page); }

/* Find a Team */
body.cr-ctx-teams-search .cr-page-title { color: var(--cr-text); }
body.cr-ctx-teams-search .cr-page > p { color: var(--cr-text-muted); }

/* Lineups dashboard */
body.cr-ctx-lineups-dashboard .lineups-header h1 { color: var(--cr-text); }
body.cr-ctx-lineups-dashboard .lineups-header p { color: var(--cr-text-muted); }
body.cr-ctx-lineups-dashboard .lineup-empty { color: var(--cr-text-muted); }
body.cr-ctx-lineups-dashboard .lineup-empty strong { color: var(--cr-text); }

/* Profile (player page) */
body.cr-ctx-profiles-show .cr-player-name { color: var(--cr-text); }
body.cr-ctx-profiles-show .cr-player-meta { color: var(--cr-text-muted); }
body.cr-ctx-profiles-show .cr-section-title { color: var(--cr-text); border-bottom-color: rgba(10, 22, 40, 0.12); }
body.cr-ctx-profiles-show .cr-section-subtitle { color: var(--cr-text-muted); }

/* ============================================================
   Del-Tri personal match history (profile page)
   ============================================================ */
.cr-deltri-connect { margin-bottom: 8px; }
.cr-deltri-hint { font-size: 0.82rem; color: var(--cr-text-muted); margin: 0 0 10px; }
.cr-deltri-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-deltri-input {
  flex: 1 1 240px; min-width: 0; padding: 9px 12px; font-size: 0.85rem;
  border: 1px solid var(--cr-border); border-radius: 8px; background: var(--cr-card); color: var(--cr-text);
}
.cr-deltri-btn { white-space: nowrap; flex-shrink: 0; }
.cr-deltri-record {
  font-size: 0.75rem; font-weight: 800; color: var(--cr-gold);
  background: rgba(24,39,64,0.14); border-radius: 999px; padding: 2px 9px; margin-left: 8px;
}
.cr-deltri-outcome { text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cr-deltri-score { font-size: 0.78rem; font-weight: 700; color: var(--cr-text-muted); font-variant-numeric: tabular-nums; }
.cr-deltri-empty { font-size: 0.85rem; color: var(--cr-text-muted); }

/* Dark-profile theming for the hint + inputs */
body.cr-ctx-profiles-show .cr-deltri-hint,
body.cr-ctx-profiles-player .cr-deltri-hint { color: var(--cr-text-muted); }
body.cr-ctx-profiles-show .cr-deltri-empty,
body.cr-ctx-profiles-player .cr-deltri-empty { color: var(--cr-text-muted); }

/* ============================================================
   Division-team drill-down (opponent results from the Standings tab)
   ============================================================ */
body.cr-ctx-division_teams-show { background: var(--cr-black); }
.cr-dt-page .cr-back-link a { color: rgba(255, 255, 255, 0.55); text-decoration: none; }
.cr-dt-page .cr-back-link a:hover { color: var(--cr-gold); }
.cr-dt-header { margin-bottom: 18px; }
.cr-dt-name { color: var(--cr-white); font-size: 1.5rem; font-weight: 800; margin: 0; }
.cr-dt-sub { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; margin: 4px 0 0; }
.cr-dt-sub strong { color: var(--cr-gold); }
.cr-dt-results { display: flex; flex-direction: column; gap: 8px; }
.cr-dt-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 10px;
  padding: 12px 14px;
}
.cr-dt-row-btn {
  width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.cr-dt-row-btn:hover { border-color: var(--cr-gold); }
.cr-opp-link { color: inherit; text-decoration: underline dotted var(--cr-gold); text-underline-offset: 3px; cursor: pointer; }
.cr-opp-link:hover { color: var(--cr-teal-deep); }
.cr-opp-link-icon { font-size: 0.8em; }
.cr-roster-pop { display: flex; flex-direction: column; }
.cr-roster-pop-row { display: flex; align-items: baseline; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--cr-border); font-size: 0.88rem; }
.cr-roster-pop-seed { width: 18px; color: var(--cr-text-light); font-size: 0.75rem; }
.cr-roster-pop-name { flex: 1; font-weight: 600; }
.cr-roster-pop-role { font-weight: 400; color: var(--cr-text-muted); font-size: 0.78rem; }
.cr-roster-pop-rating { width: 34px; text-align: right; color: var(--cr-text-muted); font-size: 0.8rem; }
.cr-roster-pop-record { width: 48px; text-align: right; font-weight: 700; color: var(--cr-teal-deep); font-variant-numeric: tabular-nums; }
.cr-dt-pop-note { font-size: 0.72rem; color: var(--cr-text-light); margin-top: 10px; }
.cr-dt-date { font-weight: 700; color: var(--cr-text-muted); width: 48px; flex-shrink: 0; font-size: 0.85rem; }
.cr-dt-ha { font-size: 0.66rem; font-weight: 800; border-radius: 5px; padding: 2px 6px; flex-shrink: 0; }
.cr-dt-ha-home { background: rgba(24, 39, 64,0.12); color: #1b2a4a; }
.cr-dt-ha-away { background: rgba(24,39,64,0.16); color: #1b2a4a; }
.cr-dt-opp { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--cr-text); }
.cr-dt-score { font-weight: 800; color: var(--cr-text-muted); font-variant-numeric: tabular-nums; }
.cr-dt-empty { color: rgba(255, 255, 255, 0.7); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 18px; text-align: center; }
.cr-dt-foot { color: rgba(255, 255, 255, 0.45); font-size: 0.78rem; margin-top: 14px; }
.cr-dt-extlink { color: var(--cr-gold); text-decoration: none; font-weight: 700; }

/* ============================================================
   Team page — segmented Schedule/Results + unified match list
   ============================================================ */
.cr-seg { display: inline-flex; background: var(--cr-bg); border: 1px solid var(--cr-border); border-radius: 999px; padding: 4px; margin-bottom: 16px; gap: 4px; }
.cr-seg-btn { border: none; background: none; cursor: pointer; font-family: inherit; padding: 8px 20px; border-radius: 999px; font-size: 0.84rem; font-weight: 700; color: var(--cr-text-muted); transition: all 0.15s; }
.cr-seg-btn-active { background: var(--cr-card); color: var(--cr-text); box-shadow: 0 1px 3px rgba(10,22,40,0.12); }

.cr-sched-list { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(10,22,40,0.04); }
.cr-sched-item { border-bottom: 1px solid var(--cr-border); }
.cr-sched-item:last-child { border-bottom: none; }
.cr-sched-item[open] { background: var(--cr-bg); }
.cr-sched-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cr-sched-row::-webkit-details-marker { display: none; }
.cr-sched-date { background: var(--cr-black); color: var(--cr-white); border-radius: 10px; padding: 7px 10px; text-align: center; min-width: 50px; flex-shrink: 0; }
.cr-sched-date-mon { font-size: 0.6rem; font-weight: 700; color: var(--cr-gold); letter-spacing: 1px; }
.cr-sched-date-day { font-size: 1.3rem; font-weight: 900; line-height: 1; margin-top: 2px; }
.cr-sched-main { flex: 1; min-width: 0; }
.cr-sched-opp { font-weight: 700; color: var(--cr-text); font-size: 1rem; line-height: 1.25; }
.cr-sched-sub { font-size: 0.8rem; color: var(--cr-text-muted); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-sched-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cr-sched-score { font-weight: 700; color: var(--cr-text-muted); font-size: 0.9rem; }
.cr-sched-upcoming { font-size: 0.72rem; color: var(--cr-text-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.cr-sched-pill { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #1b2a4a; background: rgba(24, 39, 64,0.10); padding: 3px 9px; border-radius: 999px; }
.cr-sched-caret { color: var(--cr-text-light); font-size: 0.8rem; transition: transform 0.15s; }
.cr-sched-item[open] .cr-sched-caret { transform: rotate(180deg); }
.cr-tag { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 3px 9px; border-radius: 999px; }
.cr-tag-home { background: rgba(24, 39, 64,0.10); color: #1b2a4a; }
.cr-tag-away { background: #eceef1; color: var(--cr-text-muted); }
.cr-tag-playoff { background: rgba(24,39,64,0.18); color: #1b2a4a; }

/* Edit opponent standings */
.cr-stand-edit-card { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.cr-stand-edit-name { font-weight: 800; color: var(--cr-text); margin-bottom: 10px; }
.cr-stand-edit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cr-stand-edit-grid label { display: flex; flex-direction: column; font-size: 0.7rem; font-weight: 700; color: var(--cr-text-muted); text-transform: uppercase; letter-spacing: 0.3px; gap: 4px; }
.cr-stand-edit-grid input { padding: 8px 10px; font-size: 0.95rem; border: 1px solid var(--cr-border); border-radius: 6px; color: var(--cr-text); }
@media (max-width: 520px) { .cr-stand-edit-grid { grid-template-columns: repeat(2, 1fr); } }

/* Playoff celebration banner */
.cr-playoff-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #1a1205 0%, #3a2c08 100%);
  border: 1px solid var(--cr-gold);
  border-radius: 12px; padding: 16px 20px; margin: 0 0 20px;
}
.cr-playoff-trophy { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.cr-playoff-banner-title { color: var(--cr-gold); font-size: 1.1rem; font-weight: 800; letter-spacing: 0.3px; }
.cr-playoff-banner-sub { color: rgba(255,255,255,0.75); font-size: 0.85rem; margin-top: 2px; }
.cr-sched-detail { padding: 0 16px 18px; }

/* Results rows are buttons that open a pop-up instead of expanding */
.cr-sched-row-btn {
  width: 100%; background: none; border: 0; margin: 0; font: inherit;
  color: inherit; text-align: left; -webkit-appearance: none; appearance: none;
}
.cr-sched-row-btn:hover { background: var(--cr-bg); }
.cr-sched-myteam {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--cr-gold); margin-bottom: 2px;
}

/* Result pop-up */
.cr-result-dialog {
  /* The global reset zeroes margins, which pins a modal <dialog> to the
     top-left; margin:auto + inset:0 restores the browser's centering. */
  position: fixed; inset: 0; margin: auto; height: fit-content;
  border: 0; padding: 0; border-radius: 16px; width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); background: var(--cr-card); color: var(--cr-text);
  box-shadow: 0 20px 60px rgba(10, 22, 40, 0.35);
}
.cr-result-dialog::backdrop { background: rgba(10, 22, 40, 0.55); }
.cr-result-dialog-panel { position: relative; padding: 22px 20px 20px; }
.cr-result-dialog-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: none;
  font-size: 1.6rem; line-height: 1; color: var(--cr-text-muted); cursor: pointer; padding: 4px 8px;
}
.cr-result-dialog-date {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cr-gold);
}
.cr-result-dialog-title { font-size: 1.15rem; font-weight: 800; margin: 4px 36px 8px 0; line-height: 1.3; }
.cr-result-dialog-vs { font-weight: 600; color: var(--cr-text-muted); }
.cr-result-dialog-score { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cr-sched-detail-title { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--cr-text-light); margin: 14px 0 8px; }
.cr-sched-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cr-chip-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--cr-border); background: var(--cr-card); color: var(--cr-text); font-size: 0.78rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cr-chip-btn:hover { border-color: var(--cr-gold); background: rgba(24,39,64,0.06); }

/* Team page: segmented control reads on the light-blue canvas */
/* Team page Upcoming / Results switch: same clean segmented look as the
   My Teams tabs (grey track, white pill for the selected one, no icons). */
body.cr-ctx-teams-show .cr-seg { background: #e6ebf2; border: none; border-radius: 12px; padding: 4px; }
body.cr-ctx-teams-show .cr-seg-btn { color: #1b2a4a; font-weight: 600; font-size: 0.88rem; border-radius: 9px; min-height: 40px; padding: 8px 22px; }
body.cr-ctx-teams-show .cr-seg-btn:hover { color: var(--cr-black); }
body.cr-ctx-teams-show .cr-seg-btn-active { background: var(--cr-card); color: var(--cr-black); box-shadow: 0 1px 2px rgba(10, 22, 40, 0.10), 0 1px 6px rgba(10, 22, 40, 0.06); }

@media (max-width: 640px) {
  .cr-sched-row { padding: 12px; gap: 10px; }
  .cr-sched-opp { font-size: 0.95rem; }
  .cr-chip-btn { flex: 1 1 auto; justify-content: center; }
  .cr-seg { width: 100%; }
  .cr-seg-btn { flex: 1; padding: 9px 0; }
}

/* ============================================================
   Dark theme: remaining pages (auth, admin, captain forms)
   ============================================================ */
/* Login / sign-up keep the branded dark marketing hero */
body.cr-ctx-sessions-new,
body.cr-ctx-registrations-new { background: var(--cr-black); }

/* App pages match the light-blue canvas */
body.cr-ctx-users-index,
body.cr-ctx-matches-edit_results,
body.cr-ctx-matches-edit,
body.cr-ctx-matches-new,
body.cr-ctx-matches-show,
body.cr-ctx-lineups-edit { background: var(--cr-navy-page); }

/* Sign-in landing */
body.cr-ctx-sessions-new .cr-landing-headline { color: var(--cr-white); }
body.cr-ctx-sessions-new .cr-landing-tagline { color: rgba(255, 255, 255, 0.65); }
/* The feature cards have a white background, so their title/text must keep
   their dark default colors — an earlier white override made them invisible. */
body.cr-ctx-sessions-new .cr-landing-footer,
body.cr-ctx-sessions-new .cr-admin-reset-label,
body.cr-ctx-sessions-new .cr-admin-reset-note { color: rgba(255, 255, 255, 0.5); }


/* Players admin */
body.cr-ctx-users-index .cr-page-title { color: var(--cr-text); }

/* Captain forms — headings & labels read dark on the light canvas (inputs stay light) */
body.cr-ctx-matches-edit_results .cr-page-title,
body.cr-ctx-matches-edit .cr-page-title,
body.cr-ctx-matches-new .cr-page-title,
body.cr-ctx-matches-show .cr-page-title,
body.cr-ctx-lineups-edit .cr-page-title { color: var(--cr-text); }
body.cr-ctx-matches-edit_results .cr-form-section-title,
body.cr-ctx-matches-edit_results .cr-line-label,
body.cr-ctx-matches-edit_results .cr-line-players-label,
body.cr-ctx-matches-edit_results .cr-result-label,
body.cr-ctx-matches-edit .cr-section-title { color: var(--cr-text); }
body.cr-ctx-matches-edit_results .cr-form-help { color: var(--cr-text-muted); }
body.cr-ctx-matches-edit_results .cr-field > label,
body.cr-ctx-matches-edit_results .cr-field > span,
body.cr-ctx-matches-edit .cr-field > label,
body.cr-ctx-matches-edit .cr-field > span,
body.cr-ctx-lineups-edit .cr-field > label,
body.cr-ctx-lineups-edit .cr-field > span { color: var(--cr-text); }

/* ============================================================
   Player Profile card + rating meter (TennisRecord-style)
   ============================================================ */
.cr-pp {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 14px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}
.cr-pp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--cr-border);
}
.cr-pp-head-title { font-size: 1.25rem; font-weight: 800; color: #1b2a4a; letter-spacing: 0.3px; }
.cr-pp-head-link { font-size: 0.9rem; font-weight: 600; color: var(--cr-teal-deep); text-decoration: none; }
.cr-pp-head-link:hover { text-decoration: underline; }

.cr-pp-body { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-pp-left { flex: 1 1 340px; min-width: 0; padding: 4px 0; }
.cr-pp-right {
  flex: 0 0 280px;
  border-left: 1px solid var(--cr-border);
  padding: 18px 22px;
  display: flex; flex-direction: column; align-items: center;
}
.cr-pp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--cr-border);
}
.cr-pp-left .cr-pp-row:last-child { border-bottom: none; }
.cr-pp-name {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px;
  font-size: 1.3rem; font-weight: 800; color: var(--cr-teal-deep); line-height: 1.2;
}
.cr-pp-loc { font-size: 0.9rem; font-weight: 600; color: var(--cr-text-muted); white-space: nowrap; }
.cr-pp-you { color: var(--cr-gold); font-weight: 700; }
.cr-pp-city-edit { padding: 0 22px 16px; margin-top: -8px; }
.cr-pp-left .cr-pp-row:has(+ .cr-pp-city-edit) { border-bottom: none; }
.cr-pp-city-edit summary { font-size: 0.8rem; font-weight: 600; color: var(--cr-teal-deep); cursor: pointer; list-style: none; }
.cr-pp-city-edit summary::-webkit-details-marker { display: none; }
.cr-pp-city-form { display: flex; gap: 8px; margin-top: 8px; max-width: 320px; }
.cr-pp-city-form .cr-deltri-input { flex: 1 1 auto; }
.cr-pp-city-note { font-size: 0.72rem; color: var(--cr-text-muted); margin: 4px 0 0; }
.cr-pp-sub { font-size: 0.85rem; color: #1b2a4a; margin-top: 3px; }
.cr-pp-label { font-size: 1rem; font-weight: 600; color: var(--cr-text); }
.cr-pp-live {
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--cr-teal-deep); background: var(--cr-teal-tint); border-radius: 999px; padding: 2px 7px; margin-left: 6px;
  vertical-align: middle;
}
.cr-pp-metric { text-align: right; white-space: nowrap; }
.cr-pp-metric-val { font-size: 1.7rem; font-weight: 800; color: var(--cr-text); line-height: 1.05; }
.cr-pp-metric-note { max-width: 190px; font-size: 0.72rem; color: var(--cr-text-muted); line-height: 1.35; white-space: normal; }
.cr-pp-metric-val.cr-pp-gold { color: var(--cr-gold); }
.cr-pp-metric-cap { font-size: 0.68rem; color: var(--cr-text-muted); margin-top: 2px; }

.cr-pp-meter-title { font-size: 0.8rem; color: #1b2a4a; margin-bottom: 2px; }
.cr-pp-meter { width: 100%; max-width: 240px; height: auto; }
.cr-pp-meter-scale {
  display: flex; justify-content: space-between; width: 100%; max-width: 200px;
  font-size: 0.6rem; color: var(--cr-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: -6px;
}
.cr-pp-meter-band { font-size: 1.05rem; font-weight: 800; color: var(--cr-text); margin: 6px 0 12px; letter-spacing: 0.5px; }
.cr-pp-links { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-top: auto; }
.cr-pp-link { font-size: 0.9rem; font-weight: 600; color: var(--cr-teal-deep); text-decoration: none; }
.cr-pp-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .cr-pp-right { flex: 1 1 100%; border-left: none; border-top: 1px solid var(--cr-border); }
  .cr-pp-name { font-size: 1.15rem; column-gap: 6px; }
  .cr-pp-loc { font-size: 0.8rem; }
}

/* ============================================================
   Advanced Player Stats — clean per-year / per-league matrix
   ============================================================ */
.cr-adv-league-label {
  font-size: 0.95rem; font-weight: 800; color: var(--cr-text);
  margin: 18px 0 8px; letter-spacing: 0.3px;
}
.cr-adv-wrap {
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  overflow-x: auto;
}
.cr-adv { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.cr-adv.cr-adv-compact { min-width: 360px; }
.cr-adv th, .cr-adv td { padding: 12px 10px; text-align: center; white-space: nowrap; color: var(--cr-text); }
.cr-adv thead th { background: #f7f9fc; color: #1b2a4a; font-weight: 700; font-size: 0.8rem; border-bottom: 1px solid var(--cr-border); }
.cr-adv tbody tr { border-bottom: 1px solid #eef1f5; }
.cr-adv tbody tr:last-child { border-bottom: none; }
.cr-adv-rowhead { text-align: left !important; padding-left: 18px !important; font-weight: 700; }
.cr-adv-year { color: var(--cr-teal-deep); }
.cr-adv-group { border-left: 1px solid var(--cr-border); }
.cr-adv-win { color: var(--cr-green); font-weight: 600; }
.cr-adv-loss { color: var(--cr-red); font-weight: 600; }
.cr-adv-total td { background: #f7f9fc; font-weight: 800; border-top: 2px solid var(--cr-border); }
.cr-adv-note { font-size: 0.78rem; color: var(--cr-text-muted); margin-top: 10px; }

/* Recent Matches — expandable rows (players + opponents) on the player page */
.cr-ps-details { border-bottom: 1px solid var(--cr-border); }
.cr-ps-details:last-child { border-bottom: none; }
.cr-ps-summary { cursor: pointer; list-style: none; }
.cr-ps-summary::-webkit-details-marker { display: none; }
.cr-ps-summary::marker { content: ""; }
.cr-ps-details .cr-playing-stats-row { border-bottom: none; }
.cr-ps-caret { display: inline-block; color: var(--cr-text-muted); font-size: 0.75rem; transition: transform 0.15s; }
.cr-ps-details[open] .cr-ps-caret { transform: rotate(90deg); }
.cr-ps-summary:hover { background: var(--cr-bg); }
.cr-ps-expand { padding: 4px 16px 14px 30px; background: var(--cr-bg); }
.cr-ps-expand-row { display: flex; gap: 10px; padding: 5px 0; font-size: 0.85rem; }
.cr-ps-expand-label { flex: 0 0 82px; color: var(--cr-text-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.4px; padding-top: 2px; }
.cr-ps-expand-val { flex: 1; min-width: 0; color: var(--cr-text); }
.cr-ps-playerlink { color: var(--cr-teal-deep); font-weight: 600; text-decoration: none; }
.cr-ps-playerlink:hover { text-decoration: underline; }

/* Team Summary info grid (TennisLink-style header) on the Standings tab */
.cr-teaminfo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px 28px;
  background: var(--cr-card);
  border: 1px solid var(--cr-border);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(24, 39, 64, 0.04), 0 6px 20px rgba(24, 39, 64, 0.05);
  margin-bottom: 4px;
}
.cr-teaminfo-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.cr-teaminfo-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--cr-text-muted);
}
.cr-teaminfo-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cr-text);
  line-height: 1.4;
}
.cr-teaminfo-link { color: var(--cr-teal-deep); text-decoration: none; font-weight: 700; }
.cr-teaminfo-link:hover { text-decoration: underline; }
.cr-teaminfo-sub { display: block; font-size: 0.82rem; font-weight: 500; color: var(--cr-teal-deep); text-decoration: none; margin-top: 2px; }
.cr-teaminfo-sub:hover { text-decoration: underline; }
.cr-teaminfo-address { display: block; font-size: 0.82rem; font-weight: 500; color: var(--cr-text-muted); margin-top: 2px; }

/* Edit Team Info form */
.cr-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cr-info-field { display: flex; flex-direction: column; gap: 5px; }
.cr-info-field > span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--cr-text-muted); }
.cr-info-field input {
  padding: 9px 12px; font-size: 0.9rem; border: 1px solid var(--cr-border);
  border-radius: 8px; background: var(--cr-card); color: var(--cr-text); width: 100%;
}
.cr-info-field input:focus { outline: none; border-color: var(--cr-teal); box-shadow: 0 0 0 2px var(--cr-teal-tint); }
.cr-info-field input:disabled { background: var(--cr-bg); color: var(--cr-text-light); }

/* ── Teams archive (Past Seasons) ── */
.cr-archive-section { max-width: var(--cr-col); margin: 28px auto 0; }
.cr-archive-toggle {
  cursor: pointer; display: inline-block; list-style: none;
  font-size: 0.85rem; font-weight: 700; color: var(--cr-text-muted);
}
.cr-archive-toggle::-webkit-details-marker { display: none; }
.cr-archive-toggle::after { content: " ▸"; }
.cr-archive-section[open] > .cr-archive-toggle::after { content: " ▾"; }
.cr-archive-toggle:hover { color: var(--cr-teal-deep); }
.cr-archive-league { margin-top: 12px; }
.cr-archive-league-name {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--cr-gold); border-bottom: 1px solid rgba(24, 39, 64, 0.35); padding-bottom: 3px; margin-bottom: 2px;
}
/* League and year rows open on a click (▸ closed, ▾ open). */
.cr-archive-league-name, .cr-archive-year-name { cursor: pointer; list-style: none; display: block; padding-top: 6px; }
.cr-archive-league-name::-webkit-details-marker, .cr-archive-year-name::-webkit-details-marker { display: none; }
.cr-archive-league-name::after, .cr-archive-year-name::after { content: " \25B8"; }
.cr-archive-league[open] > .cr-archive-league-name::after, .cr-archive-year[open] > .cr-archive-year-name::after { content: " \25BE"; }
.cr-archive-count { font-weight: 600; letter-spacing: 0; opacity: 0.8; }
.cr-archive-year { margin-left: 4px; }
.cr-archive-year-name { font-size: 0.82rem; font-weight: 700; color: var(--cr-text); padding: 7px 2px; border-bottom: 1px solid var(--cr-border); }
.cr-archive-year-name:hover, .cr-archive-league-name:hover { color: var(--cr-teal-deep); }
.cr-archive-year .cr-archive-row { padding-left: 14px; }
.cr-archive-year .cr-archive-row-season { min-width: 84px; }
.cr-archive-row {
  display: flex; gap: 10px; align-items: baseline; padding: 6px 2px;
  text-decoration: none; font-size: 0.85rem; color: var(--cr-text);
  border-bottom: 1px solid var(--cr-border);
}
.cr-archive-row:hover .cr-archive-row-name { color: var(--cr-teal-deep); }
.cr-archive-row-season { color: var(--cr-text-muted); min-width: 130px; font-size: 0.78rem; }
.cr-archive-row-name { flex: 1; font-weight: 700; }
.cr-archive-row-record { font-weight: 700; color: var(--cr-teal-deep); font-variant-numeric: tabular-nums; }

.cr-team-archive-action { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: -2px 0 10px; }
.cr-archived-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--cr-teal-tint); border: 1px solid rgba(24, 39, 64, 0.3); border-radius: 10px;
  padding: 10px 16px; margin: 0 0 14px; font-size: 0.88rem; color: var(--cr-text);
}

/* My Teams header — "New Team" dropdown menu */
.cr-menu { position: relative; display: inline-block; }
.cr-menu-trigger { display: inline-flex; align-items: center; gap: 5px; }
.cr-menu-caret { font-size: 0.7rem; transition: transform 0.15s; }
.cr-menu.cr-menu-open .cr-menu-caret { transform: rotate(180deg); }
.cr-menu-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: auto; z-index: 200;
  min-width: 194px; padding: 6px;
  background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px;
  box-shadow: 0 6px 26px rgba(24, 39, 64, 0.16);
  /* Closed menus take no space (display: none), so a menu that opens to the
     right can't make the page wider than a phone screen. */
  display: none; opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.cr-menu.cr-menu-open .cr-menu-panel { display: block; opacity: 1; transform: translateY(0); pointer-events: auto; }
@starting-style { .cr-menu.cr-menu-open .cr-menu-panel { opacity: 0; transform: translateY(-6px); } }
.cr-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600; color: var(--cr-text); text-decoration: none;
  background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
}
.cr-menu-item:hover { background: var(--cr-teal-tint); color: var(--cr-teal-deep); }
.cr-menu-item-btn { font-weight: 600; }
.cr-menu-note { padding: 2px 14px 8px 40px; font-size: 0.72rem; color: var(--cr-text-light); line-height: 1.35; }
.cr-menu-ico { font-size: 0.95rem; width: 18px; text-align: center; }
.cr-menu-divider { height: 1px; background: var(--cr-border); margin: 5px 4px; }

/* My Teams header — "My friendlies" dropdown: open a friendly or edit it. */
.cr-fr-menu .cr-menu-panel { width: 300px; max-width: calc(100vw - 32px); }
.cr-fr-menu-row { display: flex; align-items: center; gap: 4px; }
.cr-fr-menu-open { flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; gap: 1px; }
.cr-fr-menu-when { font-size: 0.74rem; font-weight: 600; color: var(--cr-text-light); white-space: nowrap; }
.cr-fr-menu-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-fr-menu-edit {
  flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--cr-border); border-radius: 7px;
  font-size: 0.78rem; font-weight: 700; color: var(--cr-teal-deep); text-decoration: none; background: var(--cr-card);
}
.cr-fr-menu-edit:hover { background: var(--cr-teal-tint); }
.cr-fr-menu-empty { padding: 10px 12px 6px; font-size: 0.85rem; }
.cr-fr-menu-head { justify-content: space-between; font-weight: 800; }
/* My Teams tab bar: the "Book a friendly" tab carries the friendlies menu. */
.cr-home-tab-menu { display: block; min-width: 0; }
.cr-home-tab-menu > .cr-home-tab { width: 100%; height: 100%; }
@media (max-width: 640px) {
  /* Phones: the tab is the last column, so its menu lines up with the tab's
     right edge and stays on screen. */
  .cr-home-tab-menu .cr-menu-panel { left: auto !important; right: 0; }
}
@media (max-width: 480px) {
  /* "Book a friendly" doesn't fit one line in a quarter of a phone; let tab
     labels wrap instead of being cut off. */
  .cr-home-tab { white-space: normal; line-height: 1.15; overflow: visible; }
}
/* Mouse: an invisible bridge so the menu stays open while moving down to it. */
.cr-fr-menu.cr-menu-open .cr-menu-panel::before, .cr-hover-menu.cr-menu-open .cr-menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }

/* ============================================================
   Player Ratings (/ratings) — navy hero, stat tiles, history table.
   ============================================================ */
body.cr-ctx-ratings-index, body.cr-ctx-ratings-show, body.cr-ctx-ratings-new { background: var(--cr-navy-page); }
/* One centered 760px column, like the team page (Tara's rule). */
.cr-rp-page { max-width: var(--cr-col); margin: 0 auto; padding: 16px 16px 96px; }
.cr-rp-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--cr-header-bg) 0%, var(--cr-black-soft) 100%);
  color: #fff; border-radius: 16px; padding: 22px 24px; margin: 10px 0 14px;
  border-bottom: 3px solid var(--cr-gold);
}
.cr-rp-hero-main { min-width: 0; }
.cr-rp-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--cr-gold); }
.cr-rp-name { font-family: "Bebas Neue", Inter, sans-serif; font-size: 2.4rem; letter-spacing: 1.5px; line-height: 1.05; margin: 4px 0 2px; color: #fff; overflow-wrap: anywhere; }
.cr-rp-sub { font-size: 0.88rem; color: rgba(255, 255, 255, 0.72); }
.cr-rp-hero-level {
  flex-shrink: 0; text-align: center; min-width: 92px; padding: 10px 14px;
  border: 2px solid var(--cr-gold); border-radius: 14px; background: rgba(24, 39, 64, 0.08);
}
.cr-rp-level-val { font-size: 2rem; font-weight: 800; color: var(--cr-gold); line-height: 1; font-variant-numeric: tabular-nums; }
.cr-rp-level-cap { font-size: 0.66rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); margin-top: 4px; }

.cr-rp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.cr-rp-tile { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; padding: 14px; min-width: 0; }
.cr-rp-tile-gold { border-color: rgba(24, 39, 64, 0.55); background: var(--cr-card); }
.cr-rp-tile-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--cr-text-light); }
.cr-rp-tile-val { font-size: 1.6rem; font-weight: 800; color: var(--cr-text); margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cr-rp-tile-val-sm { font-size: 1.15rem; }
.cr-rp-tile-cap { font-size: 0.74rem; color: var(--cr-text-muted); margin-top: 3px; }
.cr-rp-dot { color: var(--cr-text-light); margin: 0 4px; }

.cr-rp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.cr-rp-card { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 14px; overflow: hidden; }
.cr-rp-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--cr-border); }
.cr-rp-card-title { font-size: 1.05rem; font-weight: 800; color: var(--cr-text); margin: 0; }
.cr-rp-card-note { font-size: 0.78rem; color: var(--cr-text-light); }
.cr-rp-filter { padding: 7px 12px; border: 1px solid var(--cr-border); border-radius: 999px; font-size: 0.85rem; min-width: 0; width: 220px; max-width: 100%; }
.cr-rp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cr-rp-tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.cr-rp-tbl th { text-align: left; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--cr-text-light); background: var(--cr-bg); padding: 10px 12px; white-space: nowrap; }
.cr-rp-tbl td { padding: 11px 12px; border-top: 1px solid var(--cr-border); color: var(--cr-text); vertical-align: top; }
.cr-rp-tbl tbody tr:hover td { background: #f8fafd; }
.cr-rp-c { text-align: center !important; }
.cr-rp-nowrap { white-space: nowrap; }
.cr-rp-score { font-variant-numeric: tabular-nums; font-weight: 600; }
.cr-rp-league { min-width: 160px; color: var(--cr-text-muted); }
.cr-rp-level-chip { display: inline-block; font-size: 0.7rem; font-weight: 700; color: var(--cr-text); background: var(--cr-bg); border-radius: 6px; padding: 1px 6px; margin-left: 2px; }
.cr-rp-plink { color: var(--cr-teal-deep); font-weight: 600; text-decoration: none; }
.cr-rp-plink:hover { text-decoration: underline; }
.cr-rp-plink-strong { font-weight: 700; }
.cr-rp-wl { display: inline-block; min-width: 24px; padding: 2px 0; border-radius: 6px; font-size: 0.75rem; font-weight: 800; color: #fff; }
.cr-rp-wl-w { background: var(--cr-green); }
.cr-rp-wl-l { background: var(--cr-red); }
.cr-rp-foot { font-size: 0.78rem; color: var(--cr-text-muted); padding: 12px 18px; margin: 0; line-height: 1.5; }
.cr-rp-empty { padding: 32px 20px; text-align: center; color: var(--cr-text-muted); line-height: 1.6; }
.cr-rp-steps { margin: 14px 18px 4px 36px; color: var(--cr-text); font-size: 0.92rem; line-height: 1.7; }
.cr-rp-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 18px 20px; }
.cr-rp-upload input[type="file"] { flex: 1 1 220px; min-width: 0; }

@media (max-width: 720px) {
  .cr-rp-hero { padding: 18px 16px; }
  .cr-rp-name { font-size: 1.9rem; }
  .cr-rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-rp-tbl { font-size: 0.8rem; }
  .cr-rp-tbl td, .cr-rp-tbl th { padding: 9px 8px; }
  .cr-rp-filter { width: 100%; }
}
.cr-rp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; padding: 16px 18px; font-size: 0.9rem; color: var(--cr-text); }
.cr-rp-facts span { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--cr-text-light); }
.cr-rp-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 18px 4px; }
.cr-rp-pick select { flex: 1 1 220px; min-width: 0; padding: 9px 10px; border: 1px solid var(--cr-border); border-radius: 8px; font-size: 0.9rem; }
body.cr-ctx-usta_teams-new, body.cr-ctx-usta_teams-preview { background: var(--cr-navy-page); }

/* ── Friendlies (/friendlies/new, /f/:token) ── */
body.cr-ctx-friendlies-new, body.cr-ctx-friendlies-show, body.cr-ctx-friendlies-create { background: var(--cr-navy-page); }
.cr-fr-form { display: grid; gap: 14px; padding: 16px 18px 20px; }
.cr-fr-form label { display: grid; gap: 5px; font-size: 0.82rem; font-weight: 700; color: var(--cr-text); }
.cr-fr-form label span { font-weight: 500; color: var(--cr-text-light); }
.cr-fr-form input[type="text"], .cr-fr-form input[type="date"], .cr-fr-form select, .cr-fr-form textarea {
  padding: 10px 12px; border: 1px solid var(--cr-border); border-radius: 8px; font: inherit; font-size: 0.92rem; font-weight: 400;
  color: var(--cr-text); background-color: #fff; min-height: 44px; width: 100%; min-width: 0;
}
.cr-fr-form select {
  -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
/* "Where" suggestions under the box (place_suggest_controller) */
.cr-place { position: relative; }
.cr-place-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none;
  background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 10px; box-shadow: 0 10px 24px rgba(10,22,40,0.14);
  max-height: 300px; overflow-y: auto;
}
.cr-place-list[hidden] { display: none; }
.cr-place-opt { display: grid; gap: 1px; padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 0.9rem; }
.cr-place-opt-active, .cr-place-opt:hover { background: rgba(24,39,64,0.14); }
.cr-place .cr-place-name { font-weight: 700; color: var(--cr-text); }
.cr-place .cr-place-addr { font-weight: 400; font-size: 0.8rem; color: var(--cr-text-muted); }
.cr-fr-when { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.cr-fr-when .cr-fr-date, .cr-fr-when .cr-fr-length { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .cr-fr-when { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .cr-fr-when .cr-fr-date { grid-column: auto; }
}
.cr-fr-form fieldset { border: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cr-fr-form legend { font-size: 0.82rem; font-weight: 700; color: var(--cr-text); margin-bottom: 4px; }
.cr-fr-form .cr-fr-radio, .cr-fr-radio { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.cr-fr-error { margin: 12px 18px 0; color: var(--cr-red); font-size: 0.88rem; }
.cr-fr-note { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; padding: 12px 16px; margin: 0 0 12px; color: var(--cr-text); }
.cr-fr-claim { padding: 16px 18px; margin-bottom: 12px; }
.cr-fr-claim-form { display: flex; flex-wrap: wrap; gap: 10px; }
.cr-fr-claim-form input { flex: 1 1 200px; min-width: 0; padding: 10px 12px; border: 1px solid var(--cr-border); border-radius: 8px; font-size: 0.95rem; }
.cr-fr-status { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--cr-text); }
.cr-fr-courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cr-fr-list { list-style: none; margin: 0; padding: 6px 0; }
.cr-fr-list li { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: 0.95rem; color: var(--cr-text); border-top: 1px solid var(--cr-border); }
.cr-fr-list li:first-child { border-top: none; }
.cr-fr-check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--cr-green); color: #fff; font-size: 0.75rem; font-weight: 800; }
.cr-fr-open { color: var(--cr-text-light) !important; font-style: italic; }
.cr-fr-wait { list-style: decimal inside; }
.cr-fr-wait li { display: list-item; }
.cr-fr-remove { margin-left: auto; border: none; background: none; color: var(--cr-text-light); font-size: 1.1rem; cursor: pointer; padding: 0 4px; }
.cr-fr-remove:hover { color: var(--cr-red); }
.cr-dash-cal-item-friendly-link { text-decoration: none; display: block; }

/* Sign-up "what you get": an even 2 x 3 checklist with gold checks. */
.cr-auth-perks {
  list-style: none; display: grid; grid-template-columns: repeat(2, max-content);
  justify-content: center; column-gap: 28px; row-gap: 8px; margin: 0 0 22px; padding: 0; text-align: left;
}
.cr-auth-perks li { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 600; color: var(--cr-text); }
.cr-auth-perks .cr-icon { color: var(--cr-gold); flex-shrink: 0; }
.cr-fr-form input[type="number"] { padding: 10px 12px; border: 1px solid var(--cr-border); border-radius: 8px; font-size: 0.95rem; width: 120px; }
.cr-fr-court-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; margin-bottom: 12px; color: var(--cr-text); }
.cr-fr-court-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-fr-hint { color: var(--cr-teal-deep); font-weight: 600; font-size: 0.85rem; }

/* ── My Teams: Friendlies & Clinics tab ── */
.cr-fr-tab-head { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.cr-my-week-card-event .cr-my-week-league-label { display: flex; align-items: center; gap: 5px; }

/* ── Friendlies: list page + round-robin lineup ── */
body.cr-ctx-friendlies-index, body.cr-ctx-friendlies-edit, body.cr-ctx-friendlies-update { background: var(--cr-navy-page); }
.cr-fr-index-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 16px; }
.cr-fr-index-head .cr-rp-name { color: var(--cr-black); }
.cr-fr-index { display: grid; gap: 10px; }
.cr-fr-index-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; text-decoration: none; color: var(--cr-text); min-height: 56px; }
.cr-fr-index-main { flex: 1 1 auto; min-width: 0; }
.cr-fr-index-title { font-weight: 800; font-size: 1rem; color: var(--cr-black); }
.cr-fr-index-sub { font-size: 0.85rem; color: var(--cr-text); margin-top: 2px; }
.cr-fr-badge { flex-shrink: 0; font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.cr-fr-badge-up { background: #e3f1fb; color: #1b2a4a; }
.cr-fr-badge-done { background: #e5e7eb; color: #1f2937; }
.cr-fr-hint-block { margin: 0; font-size: 0.85rem; color: var(--cr-text); background: var(--cr-bg); border-radius: 8px; padding: 10px 12px; }
.cr-fr-big-btn { min-height: 44px; padding-left: 18px; padding-right: 18px; font-size: 0.95rem; }
.cr-fr-courts-summary { margin: 0; padding: 10px 18px 4px; color: var(--cr-text); font-size: 0.92rem; }
.cr-fr-name { flex: 1 1 auto; min-width: 0; }
.cr-fr-off { color: var(--cr-text-muted) !important; }
.cr-fr-off .cr-fr-check { background: #9ca3af; }
.cr-fr-toggle { min-height: 36px; min-width: 52px; }
.cr-fr-add-form { padding: 6px 18px 16px; }
.cr-fr-lineup { margin-top: 14px; }
.cr-fr-lineup-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cr-fr-lineup-title { font-size: 1.3rem; font-weight: 800; color: var(--cr-black); margin: 0; }
.cr-fr-lineup-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-fr-generate { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.cr-fr-generate .cr-fr-courts-summary { padding: 0; color: var(--cr-text); }
.cr-fr-sets-link { color: var(--cr-teal-deep); font-weight: 600; font-size: 0.88rem; }
.cr-fr-warn { flex-basis: 100%; margin: 0; padding: 10px 14px; border-radius: 10px; background: #eef4fa; color: #1b2a4a; font-weight: 600; font-size: 0.9rem; }
.cr-fr-swap-hint { color: var(--cr-text-muted); font-size: 0.88rem; margin: 0 0 10px; }
.cr-fr-sets { display: grid; gap: 12px; }
.cr-fr-set { background: var(--cr-card); border: 2px solid var(--cr-border); border-radius: 14px; padding: 12px 14px; }
.cr-fr-set-done { border-color: #d6ecf9; }
.cr-fr-set-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.cr-fr-set-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--cr-black); }
.cr-fr-played { font-size: 0.8rem; color: #1b2a4a; background: #e3f1fb; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.cr-fr-court-row { padding: 10px 0; border-top: 1px solid var(--cr-border); }
.cr-fr-court-label { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--cr-black); margin-bottom: 6px; }
.cr-fr-match { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-fr-pair { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-fr-vs { font-weight: 800; color: var(--cr-black); font-size: 0.85rem; }
.cr-fr-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--cr-black); background: var(--cr-card); color: var(--cr-black); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
span.cr-fr-chip { cursor: default; }
.cr-fr-chip.is-picked { background: var(--cr-gold); border-color: var(--cr-gold); color: var(--cr-black); }
/* Friendly lineup: partners match, each pair on the court in its own colour. */
.cr-fr-pair-tone-0 .cr-fr-chip { border-color: #1b2a4a; background: #e3f1fb; color: #1b2a4a; }
.cr-fr-pair-tone-1 .cr-fr-chip { border-color: #6b7688; background: #eef1f5; color: #1b2a4a; }
.cr-fr-pair-tone-2 .cr-fr-chip { border-color: #1b2a4a; background: #e3f1fb; color: #1b2a4a; }
.cr-fr-pair-tone-3 .cr-fr-chip { border-color: #1b2a4a; background: #e3f1fb; color: #1b2a4a; }
.cr-fr-pair-tone-4 .cr-fr-chip { border-color: #7d8899; background: #eef4fa; color: #1b2a4a; }
.cr-fr-pair-tone-5 .cr-fr-chip { border-color: #1b2a4a; background: #e3f1fb; color: #1b2a4a; }
.cr-lineup-share-row { display: flex; justify-content: flex-end; margin: 14px 0 8px; }

/* "Can you play?" page (/a/:token) */
.cr-poll-head { display: block; }
.cr-poll-team { font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--cr-gold); }
.cr-poll-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 0.9rem; color: var(--cr-text); }
.cr-poll-place { margin-top: 2px; }
.cr-poll-ask { padding: 14px 18px 4px; font-size: 0.95rem; color: var(--cr-text); }
.cr-poll-counts { margin-top: 4px; font-size: 0.82rem; color: var(--cr-text-muted); }
.cr-poll-yes-count { color: #1b2a4a; font-weight: 700; } .cr-poll-no-count { color: #1b2a4a; font-weight: 700; }
.cr-poll-list { list-style: none; margin: 8px 0 0; padding: 0 18px; }
.cr-poll-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--cr-border); }
.cr-poll-row-me { background: rgba(24,39,64,0.08); margin: 0 -18px; padding: 10px 18px; }
.cr-poll-name { font-weight: 700; color: var(--cr-text); min-width: 0; overflow-wrap: anywhere; }
.cr-poll-you { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #1b2a4a; background: rgba(24,39,64,0.2); padding: 2px 7px; border-radius: 999px; margin-left: 4px; }
.cr-poll-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cr-poll-form { margin: 0; }
.cr-poll-btn { min-width: 64px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--cr-border); background: var(--cr-card); font: inherit; font-weight: 800; font-size: 0.9rem; color: var(--cr-text-muted); cursor: pointer; }
/* Picked answer: the same light green / light red as the friendly name chips */
.cr-poll-btn-yes.is-on { background: #e3f1fb; border-color: #1b2a4a; color: #1b2a4a; }
.cr-poll-btn-no.is-on { background: #eef1f5; border-color: #6b7688; color: #1b2a4a; }
.cr-lineup-said { display: grid; gap: 4px; margin: 0 0 14px; font-size: 0.85rem; color: var(--cr-text); }
.cr-lineup-said-yes { color: #1b2a4a; } .cr-lineup-said-no { color: #1b2a4a; }

/* Optional court score under each match on a friendly */
.cr-fr-score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.cr-fr-score-val { display: inline-flex; align-items: baseline; gap: 6px; font-size: 1.05rem; font-weight: 600; }
.cr-fr-score-win { font-weight: 900; }
.cr-fr-score-dash { color: var(--cr-text-muted); font-weight: 600; }
.cr-fr-score-tone-0 { color: #1b2a4a; } .cr-fr-score-tone-1 { color: #1b2a4a; } .cr-fr-score-tone-2 { color: #1b2a4a; }
.cr-fr-score-tone-3 { color: #1b2a4a; } .cr-fr-score-tone-4 { color: #1b2a4a; } .cr-fr-score-tone-5 { color: #1b2a4a; }
.cr-fr-score-edit summary { cursor: pointer; list-style: none; font-size: 0.85rem; font-weight: 700; color: var(--cr-teal-deep); }
.cr-fr-score-edit summary::-webkit-details-marker { display: none; }
.cr-fr-score-edit[open] { flex-basis: 100%; }
.cr-fr-score-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.cr-fr-score-form input[type="number"] {
  width: 58px; min-height: 44px; padding: 8px; text-align: center; font: inherit; font-size: 1rem; font-weight: 700;
  border: 1px solid var(--cr-border); border-radius: 8px; color: var(--cr-text); background: var(--cr-card);
}
.cr-fr-score-form .cr-chip-btn { flex: 0 0 auto; min-height: 44px; padding-left: 18px; padding-right: 18px; }
.cr-fr-score-hint { flex-basis: 100%; font-size: 0.78rem; color: var(--cr-text-muted); }
.cr-fr-pair .cr-fr-chip.is-picked { background: var(--cr-gold); border-color: var(--cr-gold); color: var(--cr-black); }
.cr-fr-sitting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--cr-border); }
.cr-fr-sitting .cr-fr-court-label { flex-basis: 100%; margin-bottom: 0; }
.cr-fr-chip-sit { border-style: dashed; }

@media print {
  .cr-header, .cr-bottom-nav, .cr-flash, .cr-no-print, .app-footer, footer { display: none !important; }
  body { background: var(--cr-card) !important; }
  .cr-fr-lineup-title, .cr-fr-swap-hint { color: #000 !important; }
  .cr-rp-hero { background: none !important; color: #000 !important; box-shadow: none !important; }
  .cr-rp-hero * { color: #000 !important; }
  .cr-fr-sets { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
  .cr-fr-set { break-inside: avoid; padding: 8px 10px; }
  .cr-fr-chip { min-height: 0; padding: 2px 6px; font-size: 0.85rem; border-width: 1px; }
}
.cr-fr-subhead { padding: 12px 18px 2px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--cr-black); border-top: 1px solid var(--cr-border); }
.cr-fr-subhead span { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--cr-text); }
.cr-fr-check-wait { background: #7d8899; }

/* ── Bux-Mont / Del-Tri: where the match is played ── */
/* Pin, then club / street / town stacked and left-aligned in one column. */
.cr-venue { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: start; margin-top: 6px; max-width: 100%; font-size: 0.8rem; line-height: 1.4; color: var(--cr-text); text-decoration: none; text-align: left; }
.cr-venue-pin { font-size: 0.75rem; line-height: 1.6; }
.cr-venue-text { display: flex; flex-direction: column; min-width: 0; }
/* One line each; a small script shrinks a long line to fit (min 11px) and
   only lets it continue onto a second lined-up line past that. */
.cr-venue-name, .cr-venue-line { white-space: nowrap; overflow: hidden; }
.cr-venue-name.cr-fit-wrap, .cr-venue-line.cr-fit-wrap { white-space: normal; overflow-wrap: anywhere; }
.cr-venue-name { font-weight: 700; color: var(--cr-text); }
.cr-venue-line { color: var(--cr-text-muted); }
a.cr-venue:hover .cr-venue-name { text-decoration: underline; }

/* ── Bux-Mont / Del-Tri club locations (team Standings tab) ── */
.cr-clubs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.cr-clubs-list { list-style: none; margin: 10px 0 0; padding: 0; background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; overflow: hidden; }
.cr-clubs-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--cr-border); }
.cr-clubs-list li:first-child { border-top: none; }
.cr-clubs-main { flex: 1 1 auto; min-width: 0; }
.cr-clubs-name { font-weight: 700; color: var(--cr-text); font-size: 0.92rem; }
.cr-clubs-addr span { display: block; }
.cr-clubs-addr { display: block; font-size: 0.84rem; color: var(--cr-text-muted); text-decoration: none; margin-top: 2px; }
a.cr-clubs-addr:hover { text-decoration: underline; color: var(--cr-text); }
.cr-clubs-none { font-style: italic; }
.cr-clubs-foot { font-size: 0.8rem; color: var(--cr-text-muted); margin: 8px 2px 0; }
body.cr-ctx-clubs-new, body.cr-ctx-clubs-edit, body.cr-ctx-clubs-create, body.cr-ctx-clubs-update { background: var(--cr-navy-page); }

/* Friendly booking: court length chips */
.cr-fr-length { display: grid; gap: 6px; }
.cr-fr-length-title { font-size: 0.82rem; font-weight: 700; color: var(--cr-text); }
.cr-fr-length-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.cr-fr-length-chip {
  min-height: 44px; padding: 8px 10px; border: 2px solid var(--cr-border); border-radius: 999px; background: var(--cr-card);
  font: inherit; font-weight: 700; font-size: 0.92rem; color: var(--cr-text); cursor: pointer; white-space: nowrap;
}
.cr-fr-length-chip.is-picked { border-color: var(--cr-gold); background: rgba(24, 39, 64, 0.16); color: var(--cr-black); }
.cr-fr-length-chip:focus-visible { outline: 2px solid var(--cr-teal); outline-offset: 2px; }

/* My Teams header buttons on phones: an even 2 × 2 grid, same size. */
@media (max-width: 720px) {
  body.cr-ctx-teams-index .cr-page-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  body.cr-ctx-teams-index .cr-page-header-actions { position: relative; }
  body.cr-ctx-teams-index .cr-page-header-actions .cr-menu { display: block; position: static; }
  /* Odd number of buttons: the last one (+ New Team) takes the full row. */
  body.cr-ctx-teams-index .cr-page-header-actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Menus open under the whole button grid, full width, so none runs off-screen. */
  body.cr-ctx-teams-index .cr-page-header-actions .cr-menu-panel { left: 0; right: 0; width: auto; max-width: none; }
  body.cr-ctx-teams-index .cr-page-header-actions .cr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
  }
}

/* Schedule / result rows with a club address: the address gets its own row
   under the match, from the team-name column to the right edge, so long club
   names fit on one line. */
.cr-sched-row.cr-has-venue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 14px;
  row-gap: 0;
  align-items: center;
}
.cr-sched-row.cr-has-venue > .cr-sched-date { grid-row: 1 / span 2; align-self: center; }
.cr-sched-row.cr-has-venue > .cr-venue { grid-column: 2 / -1; }
@media (max-width: 720px) {
  .cr-sched-row.cr-has-venue { column-gap: 10px; }
}

/* Share a match */
.cr-share-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; }
.cr-share-btn svg { flex-shrink: 0; }
button.cr-cal-btn.cr-share-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--cr-border); border-radius: 6px; background: var(--cr-card); color: var(--cr-text-muted); cursor: pointer; font-family: inherit; }
button.cr-cal-btn.cr-share-icon:hover { border-color: var(--cr-gold); color: var(--cr-gold); }

/* Computers: a tighter team page, and match rows laid out like a fixture
   list (date | opponent & time | location | status) instead of leaving a
   wide empty gap before the status. Phones keep the stacked layout. */
@media (min-width: 900px) {
  .cr-team-page { max-width: var(--cr-col); }
  /* Capped opponent column, then the address right after it, then a fixed
     status column at the edge: no wide gap opens and every row lines up. */
  .cr-sched-row.cr-has-venue {
    grid-template-columns: 50px minmax(0, 240px) minmax(0, 1fr) 132px;
    column-gap: 18px;
  }
  .cr-sched-row.cr-has-venue > .cr-sched-right { justify-content: flex-end; }
  .cr-sched-row.cr-has-venue > .cr-sched-date { grid-row: 1; }
  .cr-sched-row.cr-has-venue > .cr-sched-main { grid-column: 2; grid-row: 1; }
  .cr-sched-row.cr-has-venue > .cr-venue { grid-column: 3; grid-row: 1; margin-top: 0; }
  .cr-sched-row.cr-has-venue > .cr-sched-right { grid-column: 4; grid-row: 1; }
}

/* Team colors next to the team name (hero) */
.cr-team-colors { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; }
.cr-color-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.75); flex-shrink: 0; }
.cr-team-colors-text { margin-left: 4px; font-size: 0.85rem; font-weight: 600; color: #fff; }
.cr-team-colors-label { font-weight: 500; color: rgba(255, 255, 255, 0.6); }

/* Friendly page, signed-out visitors: invitation to join */
.cr-join-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 18px; padding: 18px 20px; background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 14px; }
.cr-join-text { flex: 1 1 260px; min-width: 0; }
.cr-join-title { font-weight: 800; font-size: 1rem; color: var(--cr-black); }
.cr-join-text p { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.45; color: var(--cr-text-muted); }
.cr-join-actions { display: flex; align-items: center; gap: 16px; }
.cr-join-signin { font-size: 0.88rem; font-weight: 600; color: var(--cr-text); text-decoration: none; }
.cr-join-signin:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .cr-join-actions { width: 100%; }
  .cr-join-actions .cr-btn { flex: 1; justify-content: center; text-align: center; min-height: 44px; display: inline-flex; align-items: center; }
}

/* Comfortable reading widths on computers: no wide hollow gaps between a
   name and its buttons. Lists/forms are narrow; data tables keep 1040px. */
.cr-rp-page.cr-rp-narrow { max-width: 680px; }
.cr-rp-page.cr-fr-page { max-width: var(--cr-col); }

/* Top-bar search (computers); phones get the 🔍 button. */
.cr-header-search { display: flex; margin: 0; }
.cr-header-search input {
  width: 220px; padding: 7px 14px 7px 32px; border-radius: 999px; font: inherit; font-size: 0.82rem;
  color: #fff; background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%23c9d2e0' stroke-width='2.4'/%3E%3Cpath d='M16.5 16.5 21 21' stroke='%23c9d2e0' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 12px center;
  border: 1px solid rgba(255, 255, 255, 0.25); outline: none; transition: width 0.15s, border-color 0.15s;
}
.cr-header-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.cr-header-search input:focus { width: 240px; border-color: var(--cr-gold); background-color: rgba(255, 255, 255, 0.12); }
/* Closed: just a 34px circle with the magnifier, the same size as the phone
   🔍 button. It opens on click/tab and stays open while it has text. */
.cr-header-search input:not(:focus):placeholder-shown {
  width: 34px; height: 34px; padding: 0; cursor: pointer; color: transparent; background-position: center; background-size: 16px;
}
.cr-header-search input:not(:focus):placeholder-shown::placeholder { color: transparent; }
.cr-header-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cr-header-search-icon {
  display: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px;
  color: rgba(255, 255, 255, 0.9); border: 1px solid rgba(255, 255, 255, 0.25);
}
/* Search results page */
.cr-search-page-form { display: flex; gap: 8px; margin: 4px 0 18px; }
.cr-search-page-input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--cr-border); border-radius: 10px; font: inherit; font-size: 1rem; background: var(--cr-card); }
.cr-search-hint { color: var(--cr-text-muted); font-size: 0.9rem; }
.cr-search-head { margin: 20px 0 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cr-gold); }
.cr-search-head span { color: var(--cr-text-light); letter-spacing: 0; }
.cr-search-list { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; overflow: hidden; }
.cr-search-row, .cr-search-rowlink { display: grid; gap: 1px; padding: 11px 14px; text-decoration: none; color: var(--cr-text); min-width: 0; }
.cr-search-row + .cr-search-row { border-top: 1px solid var(--cr-border); }
a.cr-search-row:hover, .cr-search-rowlink:hover { background: var(--cr-teal-tint); }
.cr-search-row-split { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 0; }
.cr-search-row-split .cr-search-rowlink { flex: 1; }
.cr-search-main { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.cr-search-sub { font-size: 0.8rem; color: var(--cr-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-search-chip { flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--cr-border); border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: var(--cr-teal-deep); text-decoration: none; }
.cr-search-chip:hover { background: var(--cr-teal-tint); }

/* Admin: Site members (/admin/members) */
.cr-user-menu .cr-header-user { font: inherit; font-size: 0.82rem; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cr-user-menu .cr-header-user:hover, .cr-user-menu.cr-menu-open .cr-header-user { background: rgba(24, 39, 64, 0.12); }
.cr-user-menu .cr-menu-panel { right: 0; left: auto; min-width: 250px; }
.cr-founder-links { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
body.cr-ctx-admin-members { background: var(--cr-navy-page); }
.cr-rp-page.cr-mem-page { max-width: var(--cr-col); }
.cr-mem-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 0; }
.cr-mem-stat { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--cr-border); border-radius: 10px; background: var(--cr-card); text-align: center; }
.cr-mem-stat strong { font-size: 1.35rem; color: var(--cr-text); line-height: 1.1; }
.cr-mem-stat span { font-size: 0.74rem; color: var(--cr-text-light); font-weight: 600; }
.cr-mem-note { margin: 10px 18px 4px; font-size: 0.78rem; color: var(--cr-text-light); }
.cr-mem-list { padding: 4px 0 8px; }
.cr-mem-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px 90px 70px; gap: 10px; align-items: center;
  padding: 10px 18px; border-top: 1px solid var(--cr-border);
}
.cr-mem-headrow { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--cr-text-light); border-top: none; padding-top: 12px; padding-bottom: 6px; }
.cr-mem-headrow span:nth-child(n+4) { text-align: right; }
.cr-mem-who { display: grid; gap: 1px; min-width: 0; }
.cr-mem-name { font-weight: 700; color: var(--cr-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-mem-name:hover { color: var(--cr-teal-deep); }
/* Remove sits right after the name; a long (spam) name shortens with "…". */
.cr-mem-nameline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cr-mem-nameline .cr-mem-name { flex: 0 1 auto; min-width: 0; }
.cr-mem-remove-form { flex: none; margin: 0; }
.cr-mem-edit { flex: none; font-size: 0.72rem; font-weight: 700; color: var(--cr-text-muted); text-decoration: none; border: 1px solid var(--cr-border); border-radius: 999px; padding: 2px 10px; }
.cr-mem-edit:hover { color: var(--cr-text); border-color: var(--cr-text-light); }
.cr-mem-remove { font: inherit; font-size: 0.72rem; font-weight: 700; color: #1b2a4a; background: transparent; border: 1px solid rgba(107, 118, 136, 0.35); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.cr-mem-remove:hover { background: rgba(107, 118, 136, 0.06); }
.cr-mem-email, .cr-mem-teams { font-size: 0.76rem; color: var(--cr-text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-mem-cell { font-size: 0.86rem; color: var(--cr-text); white-space: nowrap; }
.cr-mem-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .cr-mem-stats { gap: 6px; padding: 12px 12px 0; }
  .cr-mem-stat { padding: 8px 4px; }
  .cr-mem-stat strong { font-size: 1.1rem; }
  .cr-mem-stat span { font-size: 0.66rem; }
  .cr-mem-note { margin: 10px 12px 4px; }
  .cr-mem-headrow { display: none; }
  .cr-mem-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 12px; }
  .cr-mem-who { grid-column: 1 / -1; }
  .cr-mem-cell { display: grid; font-size: 0.82rem; text-align: left; }
  .cr-mem-cell::before { content: attr(data-label); font-size: 0.64rem; font-weight: 700; color: var(--cr-text-light); text-transform: uppercase; letter-spacing: 0.3px; }
}
/* Friendly roster: the × column always takes the same space so Out lines up. */
.cr-fr-remove, .cr-fr-remove-spacer { width: 28px; flex-shrink: 0; text-align: center; margin-left: 0; }
.cr-fr-remove-spacer { display: inline-block; }
.cr-fr-list li .cr-fr-toggle { margin-left: auto; }

/* Phones: the hero's number box (courts needed / USTA level) moves under the
   title as a slim pill, so the title gets the full width. */
@media (max-width: 520px) {
  .cr-rp-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cr-rp-hero-level { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 14px; text-align: left; }
  .cr-rp-level-val { font-size: 1.25rem; }
  .cr-rp-level-cap { margin-top: 0; }
}

/* Friendly page: where it's played (tap for Google Maps) */
.cr-fr-place { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; padding: 10px 16px 12px; margin: 0 0 12px; }
.cr-fr-place .cr-venue { margin-top: 0; font-size: 0.92rem; }
.cr-fr-actions { margin: 2px 0 10px; }
@media (max-width: 520px) {
  /* Friendly action buttons: an even 2 x 2 grid. */
  .cr-fr-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .cr-fr-actions > *, .cr-fr-actions form, .cr-fr-actions .cr-chip-btn { width: 100%; margin: 0; }
  .cr-fr-actions .cr-chip-btn { justify-content: center; min-height: 40px; }
  /* Set header buttons keep their natural size. */
  .cr-fr-set-head .cr-chip-btn { flex: 0 0 auto; }
  /* Each court: one pair per line, "vs" between, smaller name chips. */
  .cr-fr-match { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cr-fr-match { align-items: stretch; width: 100%; }
  .cr-fr-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; width: 100%; }
  .cr-fr-chip { justify-content: center; text-align: center; min-height: 40px; padding: 6px 6px; font-size: 0.84rem; }
  .cr-fr-vs { padding-left: 4px; }
}

/* My Teams Upcoming / Friendlies rows. Phone: date | details | buttons, with
   the 📍 place under the details. Computer: one tidy row (date | match |
   place | buttons) in the same 760px column as the tab bar, with a fixed
   place column so the address sits right after the match details. */
.cr-cu-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "date info right" "date place right";
  align-items: start;
  column-gap: 12px;
}
.cr-cu-row > .cr-my-week-date  { grid-area: date; align-self: center; }
.cr-cu-row > .cr-my-week-info  { grid-area: info; }
.cr-cu-row > .cr-cu-place      { grid-area: place; min-width: 0; }
.cr-cu-row > .cr-my-week-right { grid-area: right; align-self: center; }
.cr-cu-place:empty { display: none; }
.cr-cu-place .cr-venue { margin-top: 4px; font-size: 0.74rem; }
@media (min-width: 900px) {
  .cr-my-week-list:has(> .cr-cu-row) { max-width: var(--cr-col); }
  .cr-cu-row {
    grid-template-columns: 52px minmax(0, 230px) minmax(0, 1fr) 76px;
    grid-template-areas: "date info place right";
    align-items: center;
    column-gap: 20px;
    padding: 12px 18px;
  }
  .cr-cu-place:empty { display: block; }
  .cr-cu-place .cr-venue { margin-top: 0; font-size: 0.8rem; }
  .cr-cu-row > .cr-my-week-right { flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
}

/* Delete team: same chip, red so it never looks like a routine action. */
.cr-chip-btn.cr-chip-danger { color: #1b2a4a; border-color: rgba(107, 118, 136, 0.35); }
.cr-chip-btn.cr-chip-danger:hover { background: rgba(107, 118, 136, 0.07); border-color: #6b7688; color: #1b2a4a; }

/* My Teams: the tab bar and the capped Upcoming / Friendlies lists sit in
   the middle of the page, not hugging the left edge. */
.cr-home-tabs { margin-left: auto; margin-right: auto; }
@media (min-width: 900px) {
  .cr-my-week-list:has(> .cr-cu-row) { margin-left: auto; margin-right: auto; }
  .cr-fr-tab-head { max-width: var(--cr-col); margin-left: auto; margin-right: auto; }
  .cr-coming-up-empty { max-width: var(--cr-col); margin-left: auto; margin-right: auto; }
}
.cr-home-page > .cr-page-header-row {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.cr-home-page > .cr-page-header-row .cr-page-header-actions { justify-content: center; flex-wrap: wrap; }

/* My Teams standings: a compact, centered table (same 880px column as the
   Upcoming list) instead of stretching across the page. Numbers sit in
   narrow fixed columns next to the team; Next gets the leftover room. */
@media (min-width: 900px) {
  .cr-standings-wrap, .cr-st-hint { max-width: var(--cr-col); margin-left: auto; margin-right: auto; }
  .cr-standings { table-layout: fixed; }
  .cr-standings th:nth-child(1) { width: 52px; }
  .cr-standings th:nth-child(2) { width: 40%; }
  .cr-standings th:nth-child(3), .cr-standings th:nth-child(4) { width: 44px; }
  .cr-standings th:nth-child(5) { width: 64px; }
  .cr-standings thead th, .cr-standings tbody td { padding: 12px 10px; }
  .cr-standings thead th:first-child, .cr-standings tbody td:first-child { padding-left: 18px; }
  .cr-standings thead th:last-child, .cr-standings tbody td:last-child { padding-right: 18px; }
  .cr-st-league td { padding-left: 18px; }
  .cr-st-next { overflow: hidden; text-overflow: ellipsis; }
  .cr-st-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Phones: the grey league line stays on one line (… if it's too long). */
@media (max-width: 640px) {
  .cr-st-sub { max-width: calc(100vw - 250px); min-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Past matches still waiting for scores (USTA has no automatic feed). */
.cr-awaiting-alert {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 11px 14px;
  background: #eef4fa; border: 1px solid #eef4fa; border-radius: 12px;
  color: #1b2a4a; font-size: 0.86rem; line-height: 1.4;
}
.cr-awaiting-alert-icon { font-size: 1rem; }
.cr-awaiting-alert-text { flex: 1 1 220px; min-width: 0; }
.cr-awaiting-alert-text strong { color: #1b2a4a; }
.cr-awaiting-alert-btn { flex-shrink: 0; }
.cr-awaiting-list { margin-bottom: 12px; }
.cr-awaiting-row { cursor: default; background: var(--cr-card); }
.cr-awaiting-badge {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  background: #eef4fa; color: #1b2a4a; border: 1px solid #eef4fa;
  font-size: 0.74rem; font-weight: 700; text-decoration: none;
}
.cr-awaiting-badge-link:hover { background: #eef4fa; }

/* My Availability: compact rows, one per match (date | match | In / Out / note).
   Same 880px column as the rest of the team page; no big empty card space. */
.cr-av-list {
  background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 14px; overflow: hidden;
}
.cr-av-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--cr-border);
}
.cr-av-row:last-child { border-bottom: none; }
.cr-av-info { min-width: 0; }
.cr-av-opp { font-weight: 700; font-size: 0.95rem; color: var(--cr-text); line-height: 1.25; }
.cr-av-place { color: var(--cr-text-muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cr-av-row .cr-sched-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.cr-av-actions { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cr-av-actions .cr-avail-btn { padding: 7px 14px; }
.cr-av-actions .cr-avail-message { min-width: 0; width: 100%; padding: 7px 12px; }
.cr-av-actions .cr-saved:empty { display: none; }
@media (min-width: 900px) {
  .cr-av-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 360px); padding: 12px 18px; }
  .cr-av-actions { grid-column: auto; }
}
/* Paste a match's official scorecard link right in the result pop-up. */

/* ── Line icons (replaced emoji, Oct 2026) ── */
.cr-icon { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.cr-bnav-icon { display: inline-flex; color: rgba(255, 255, 255, 0.72); filter: none; }
.cr-bnav-active .cr-bnav-icon { color: var(--cr-gold); transform: none; }
.cr-venue-pin { color: var(--cr-teal-deep); line-height: 1.2; }
.cr-sheet-tr-link { color: var(--cr-text-light); margin-left: 3px; }
.cr-sheet-tr-link:hover { color: var(--cr-teal-deep); }
.cr-opp-link-icon { color: var(--cr-text-light); margin-left: 2px; }
.cr-awaiting-alert-icon { color: #1b2a4a; display: inline-flex; }
.cr-playoff-trophy { color: var(--cr-gold); display: inline-flex; }
.cr-password-toggle { font-size: 0.75rem; font-weight: 600; color: var(--cr-text-muted); }
/* Availability dots on the captain view (were emoji). */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot-in { background: #1b2a4a; }
.dot-out { background: #6b7688; }
.dot-none { background: var(--cr-card); border: 1.5px solid #cbd5e1; }
.cr-sc-sub { color: var(--cr-text-muted); font-size: 0.9rem; margin: 6px 0 10px; }

/* ── Doubles Pairs (team page, Player Stats tab) ── */
.cr-dp { margin-top: 28px; }
.cr-dp-head { margin-bottom: 10px; }
.cr-dp-note { color: var(--cr-text-muted); font-size: 0.84rem; line-height: 1.45; margin-top: 4px; }
.cr-dp-empty { color: var(--cr-text-muted); font-size: 0.88rem; padding: 14px 16px; background: var(--cr-card); border: 1px dashed var(--cr-border); border-radius: 12px; }
.cr-dp-list { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 14px; overflow: hidden; }
.cr-dp-list-ideas { border-style: dashed; }
.cr-dp-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--cr-border); }
.cr-dp-row:last-child { border-bottom: none; }
.cr-dp-main { min-width: 0; }
.cr-dp-names { font-weight: 700; font-size: 0.95rem; color: var(--cr-text); line-height: 1.35; }
.cr-dp-name { color: var(--cr-text); text-decoration: none; }
.cr-dp-name:hover { color: var(--cr-teal-deep); text-decoration: underline; }
.cr-dp-sub { color: var(--cr-text-muted); font-size: 0.8rem; margin-top: 3px; }
.cr-dp-stats { text-align: right; flex-shrink: 0; }
.cr-dp-record { font-size: 1.25rem; font-weight: 800; color: var(--cr-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cr-dp-count { color: var(--cr-text-muted); font-size: 0.74rem; margin-top: 2px; white-space: nowrap; }
.cr-dp-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; vertical-align: 2px; }
.cr-dp-tag-regular { background: var(--cr-teal-tint); color: var(--cr-teal-deep); }
.cr-dp-tag-sub { background: #eef4fa; color: #1b2a4a; }
.cr-dp-more { margin-top: 8px; }
.cr-dp-more > summary { cursor: pointer; color: var(--cr-teal-deep); font-weight: 600; font-size: 0.86rem; padding: 6px 2px; list-style: none; }
.cr-dp-more[open] > summary { margin-bottom: 8px; }
@media (min-width: 900px) { .cr-dp { max-width: 720px; } }
.cr-nowrap { white-space: nowrap; }

/* Result pop-up: no line scores yet → upload the TennisLink scorecard file. */
.cr-upload-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cr-upload-card p { margin: 0; flex: 1 1 260px; }
.cr-upload-card .cr-btn { flex-shrink: 0; white-space: nowrap; }

/* Sign-up bot trap: off-screen, never seen or tabbed to by people. */
.cr-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cr-btn-danger-text { color: #1b2a4a; border-color: rgba(107, 118, 136, 0.35); }

/* Player Ratings list: names, level, record and win % sit together; only the
   last column takes the leftover width, so no gap opens after the names. */
@media (min-width: 601px) {
  .cr-rp-tbl-compact th, .cr-rp-tbl-compact td { width: 1%; white-space: nowrap; }
  .cr-rp-tbl-compact th:last-child, .cr-rp-tbl-compact td:last-child { width: auto; }
  .cr-rp-tbl-compact td:first-child, .cr-rp-tbl-compact th:first-child { padding-right: 28px; }
}

/* Phones: the Player Ratings table fits the screen with no sideways scroll and
   short, single-line rows. Fixed widths keep names on one line; the least-
   critical "Last played" column is dropped (tap a name for the full record). */
@media (max-width: 600px) {
  .cr-rp-scroll { overflow-x: hidden; }
  .cr-rp-tbl { table-layout: fixed; width: 100%; font-size: 0.84rem; }
  .cr-rp-tbl th, .cr-rp-tbl td { padding: 9px 4px; vertical-align: middle; }
  .cr-rp-tbl th { white-space: normal; letter-spacing: 0.3px; line-height: 1.15; }
  .cr-rp-tbl th:first-child, .cr-rp-tbl td:first-child {
    width: 44%; padding-left: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cr-rp-tbl th:nth-child(2), .cr-rp-tbl td:nth-child(2) { width: 19%; } /* USTA level */
  .cr-rp-tbl th:nth-child(3), .cr-rp-tbl td:nth-child(3) { width: 19%; } /* Record */
  .cr-rp-tbl th:nth-child(4), .cr-rp-tbl td:nth-child(4) { width: 18%; } /* Win % */
  .cr-rp-tbl th:nth-child(5), .cr-rp-tbl td:nth-child(5) { display: none; } /* Last played */
}

/* Players & Teams (/lookup): one centered 760px column. "← My Teams" sits
   top-left like every back link; one search field with its button joined to
   it; each table is name first, then narrow number columns, and the one text
   column (Teams / League) last so it takes the leftover width — no gaps. */
.cr-lookup-page { max-width: var(--cr-col); margin: 0 auto; }
.cr-lookup-head { text-align: center; margin: 4px 0 18px; }
.cr-lookup-head .cr-home-subtitle { margin-top: 6px; }
.cr-lookup-search {
  display: flex; width: 100%; max-width: 420px; margin: 0 auto 22px;
  border: 1px solid var(--cr-border); border-radius: 999px; background: var(--cr-card); overflow: hidden;
}
.cr-lookup-search:focus-within { border-color: var(--cr-gold); box-shadow: 0 0 0 3px rgba(24, 39, 64, 0.18); }
.cr-lookup-input { flex: 1 1 auto; min-width: 0; padding: 10px 16px; border: 0; font: inherit; font-size: 0.92rem; background: transparent; color: var(--cr-text); outline: none; }
.cr-lookup-search .cr-btn { border-radius: 0; margin: 0; padding: 0 20px; box-shadow: none; }
.cr-lookup-search .cr-btn + .cr-btn { border-left: 1px solid var(--cr-border); }
.cr-lookup-result-note { font-size: 0.86rem; color: var(--cr-text-muted); margin: -8px 0 16px; text-align: center; }
.cr-lookup-muted { font-size: 0.8rem; color: var(--cr-text-muted); }
.cr-lookup-note { margin: 0; padding: 10px 18px 12px; font-size: 0.76rem; color: var(--cr-text-light); border-top: 1px solid var(--cr-border); }
.cr-lookup-foot { border: 0; padding: 4px 2px; text-align: center; }
.cr-lookup-page .cr-standings tbody tr.cr-st-row:first-child td { background: transparent; }
.cr-lookup-page .cr-standings tbody tr.cr-st-row:first-child td:first-child { box-shadow: none; }
.cr-lookup-tbl td, .cr-lookup-tbl th { overflow-wrap: normal; }
.cr-lookup-tbl th.cr-st-n, .cr-lookup-tbl td.cr-st-n { width: 52px; }
@media (min-width: 900px) {
  .cr-lookup-page .cr-lookup-tbl th { width: auto; }
  .cr-lookup-page .cr-lookup-tbl th.cr-st-n { width: 56px; }
  .cr-lookup-page .cr-lookup-tbl th:first-child:not(.cr-st-n),
  .cr-lookup-page .cr-lookup-tbl th.cr-st-n:first-child + th { width: 230px; }
  .cr-lookup-page .cr-lookup-tbl th.cr-st-n:first-child { width: 48px; }
  .cr-lookup-page .cr-lookup-tbl th.cr-lookup-wide, .cr-lookup-page .cr-lookup-tbl td.cr-lookup-wide { padding-left: 24px; }
}
/* Phones: drop the long text column so nothing needs a sideways swipe. */
@media (max-width: 600px) {
  .cr-lookup-tbl .cr-lookup-wide { display: none; }
  /* The shared standings rule hides column 5 on phones; here that's Pts. */
  .cr-lookup-page .cr-lookup-tbl th.cr-st-n, .cr-lookup-page .cr-lookup-tbl td.cr-st-n { display: table-cell; }
  .cr-lookup-tbl td { white-space: normal; }
  .cr-lookup-tbl th, .cr-lookup-tbl td { padding-left: 10px; padding-right: 10px; }
  .cr-lookup-tbl th.cr-st-n:first-child, .cr-lookup-tbl td.cr-st-n:first-child { width: 30px; }
  .cr-lookup-tbl th.cr-st-n, .cr-lookup-tbl td.cr-st-n { width: 44px; }
}

/* ========================================================
   Left column (signed in) — shared/_sidebar.html.erb
   Computers (1000px+): a 248px navy column beside every page, under a
   fixed-height top bar with just the logo. Phones and tablets: the ☰ button
   slides the same column in over the page (bottom tab bar stays).
   ======================================================== */
:root { --cr-hh: 64px; --cr-sb-w: 248px; }
/* One centered column on every page. Widened Nov 18 2026 (Tara: 760px left
   ~450px of grey each side on a big monitor). */
:root { --cr-col: 920px; }   /* Tara, Nov 18 2026 (later): 1040/1200 felt too wide on her computer — thinner. */
.cr-has-sb .cr-header-inner { max-width: none; height: var(--cr-hh); padding-top: 0; padding-bottom: 0; box-sizing: border-box; }
.cr-sb-burger {
  display: none; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; color: #fff; cursor: pointer;
}
.cr-shell { display: grid; grid-template-columns: var(--cr-sb-w) minmax(0, 1fr); align-items: start; }
.cr-shell-main { min-width: 0; }
.cr-sb {
  position: sticky; top: var(--cr-hh); height: calc(100vh - var(--cr-hh)); overflow-y: auto; overscroll-behavior: contain;
  box-sizing: border-box; padding: 16px 12px 24px; background: #12213d; color: #dbe3ef;
  display: flex; flex-direction: column; gap: 2px; border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.cr-sb-scrim { display: none; }
.cr-sb > * { flex-shrink: 0; }

/* Your name: opens My profile / Site members / Sign out below it. */
.cr-sb-menu { position: relative; }
.cr-sb-user {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(24, 39, 64, 0.45); color: #fff;
  font: inherit; text-align: left; cursor: pointer;
}
.cr-sb-user:hover, .cr-sb-menu.cr-menu-open .cr-sb-user { background: rgba(255, 255, 255, 0.09); }
.cr-sb-avatar {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #7d8899, #7d8899); color: #12213d; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.3px;
}
.cr-sb-who { display: grid; min-width: 0; }
.cr-sb-name { font-size: 0.92rem; font-weight: 700; color: #1b2a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-sb-meta { font-size: 0.72rem; color: #1b2a4a; }
.cr-sb-caret { margin-left: auto; font-size: 0.7rem; color: #1b2a4a; }
.cr-sb-menu .cr-menu-panel { left: 0; right: 0; min-width: 0; }
.cr-sb-menu .cr-menu-item { flex-direction: column; align-items: flex-start; gap: 1px; }
.cr-sb-menu .cr-menu-item small { font-size: 0.73rem; font-weight: 500; color: var(--cr-text-muted); }
.cr-sb-signout-form { margin: 0; }
.cr-sb-signout { color: #1b2a4a; }

.cr-sb-search {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; padding: 0 12px; height: 36px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.07); border: 1px solid transparent; color: #1b2a4a;
}
.cr-sb-search:focus-within { border-color: rgba(24, 39, 64, 0.6); background: rgba(255, 255, 255, 0.1); }
.cr-sb-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: inherit; font-size: 0.84rem; outline: none; }
.cr-sb-search input::placeholder { color: #8d9db5; }
.cr-sb-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.cr-sb-h { margin: 14px 10px 4px; font-size: 0.64rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #1b2a4a; }
.cr-sb-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: #dbe3ef; text-decoration: none; font-size: 0.88rem; font-weight: 600;
}
.cr-sb-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.cr-sb-link .cr-icon { flex: none; opacity: 0.85; }
.cr-sb-link.is-on { background: rgba(24, 39, 64, 0.16); color: #1b2a4a; box-shadow: inset 3px 0 0 #1b2a4a; }
.cr-sb-dot { flex: none; width: 8px; height: 8px; margin: 0 4px 0 5px; border-radius: 50%; }
.cr-sb-team-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-sb-team small { margin-left: auto; padding-left: 8px; font-size: 0.68rem; font-weight: 600; color: #1b2a4a; white-space: nowrap; }

/* + New Team: opens upward. */
.cr-sb-new { margin-top: 16px; }
.cr-sb-newbtn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #1b2a4a, #1b2a4a); color: #fff; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
}
.cr-sb-newbtn:hover { filter: brightness(1.06); }
.cr-sb-new .cr-menu-panel { top: auto; bottom: calc(100% + 6px); }

/* My Teams on computers: the column replaces the tab bar and the buttons
   under the title (phones keep them). */
@media (min-width: 1000px) {
  .cr-has-sb.cr-ctx-teams-index .cr-home-tabs,
  .cr-has-sb.cr-ctx-teams-index .cr-home-page > .cr-page-header-row .cr-page-header-actions { display: none; }
  .cr-has-sb.cr-ctx-teams-index .cr-fr-panel-head { display: flex; }
}
/* Book a friendly row on the Friendlies tab: only where the tab bar is hidden. */
.cr-fr-panel-head { display: none; gap: 10px; justify-content: flex-start; margin: 0 auto 14px; max-width: var(--cr-col); }

@media (max-width: 999px) {
  .cr-sb-burger { display: inline-flex; }
  .cr-shell { display: block; }
  .cr-sb {
    position: fixed; left: 0; top: var(--cr-hh); bottom: 0; height: auto; width: min(300px, 84vw); z-index: 10001;
    transform: translateX(-102%); transition: transform 0.2s ease; box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3); visibility: hidden;
  }
  .cr-sb-open .cr-sb { transform: none; visibility: visible; }
  .cr-sb-open .cr-sb-scrim { display: block; position: fixed; inset: var(--cr-hh) 0 0 0; z-index: 10000; background: rgba(10, 22, 40, 0.45); }
  .cr-sb-open { overflow: hidden; }
}
@media (max-width: 720px) {
  :root { --cr-hh: 56px; }
  .cr-sb { padding-bottom: 96px; }
}

/* Lineups (/lineups): one card, one row per match in the 760px column.
   date | team, opponent, when | status (fixed) | one action (fixed). */
.cr-lu-page { max-width: var(--cr-col); margin: 0 auto; }
.cr-lu-head { text-align: center; margin: 4px 0 20px; }
.cr-lu-head .cr-home-subtitle { margin-top: 6px; }
.cr-lu-card { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 27, 51, 0.04); }
.cr-lu-empty { padding: 36px 24px; text-align: center; color: var(--cr-text-muted); font-size: 0.9rem; }
.cr-lu-empty p + p { margin-top: 6px; font-size: 0.84rem; }
.cr-lu-row {
  display: grid; grid-template-columns: 46px minmax(0, 340px) minmax(0, 1fr) 108px; gap: 4px 16px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--cr-border); cursor: pointer; transition: background 0.12s;
}
.cr-lu-row:first-child { border-top: 0; }
.cr-lu-row:hover { background: #fafbfd; }
.cr-lu-date {
  display: grid; justify-items: center; align-content: center; width: 46px; height: 50px; border-radius: 9px;
  background: var(--cr-black); color: #fff; line-height: 1;
}
.cr-lu-date span { font-size: 0.58rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cr-gold); }
.cr-lu-date strong { margin-top: 3px; font-size: 1.15rem; font-weight: 800; }
.cr-lu-info { min-width: 0; }
.cr-lu-team { font-size: 0.66rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--cr-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-lu-opp { display: block; margin-top: 1px; font-size: 0.95rem; font-weight: 700; color: var(--cr-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-lu-opp:hover { color: var(--cr-teal-deep); }
.cr-lu-when { margin-top: 2px; font-size: 0.78rem; color: var(--cr-text-muted); }
.cr-lu-when strong { color: var(--cr-text); font-weight: 700; }
.cr-lu-status {
  justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; white-space: nowrap;
}
.cr-lu-status.is-muted { background: #eef1f5; color: #1b2a4a; }
.cr-lu-status.is-gold { background: rgba(24, 39, 64, 0.15); color: #1b2a4a; }
.cr-lu-status.is-yes { background: rgba(24, 39, 64, 0.12); color: #1b2a4a; }
.cr-lu-status.is-no { background: rgba(107, 118, 136, 0.1); color: #1b2a4a; }
.cr-lu-action { justify-self: stretch; }
.cr-lu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 34px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--cr-border); border-radius: 9px; background: var(--cr-card); color: var(--cr-text);
  font-size: 0.8rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: border-color 0.12s, background 0.12s;
}
.cr-lu-btn:hover { border-color: var(--cr-text-light); }
.cr-lu-btn.is-primary { background: var(--cr-black); border-color: var(--cr-black); color: #fff; }
.cr-lu-btn.is-primary:hover { background: var(--cr-black-soft); }
.cr-lu-btn.is-yes { width: auto; background: rgba(24, 39, 64, 0.1); border-color: rgba(24, 39, 64, 0.35); color: #1b2a4a; }
.cr-lu-btn.is-no { width: auto; background: rgba(107, 118, 136, 0.06); border-color: rgba(107, 118, 136, 0.3); color: #1b2a4a; }
.cr-lu-reply { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.8rem; color: var(--cr-text-muted); }
.cr-lu-reply span { margin-right: auto; }
@media (max-width: 600px) {
  .cr-lu-row { grid-template-columns: 44px minmax(0, 1fr) 96px; grid-template-areas: "date info action" "date status action"; padding: 12px 14px; gap: 4px 12px; }
  .cr-lu-date { grid-area: date; align-self: start; width: 44px; }
  .cr-lu-info { grid-area: info; }
  .cr-lu-status { grid-area: status; }
  .cr-lu-action { grid-area: action; }
  .cr-lu-btn { padding: 0 8px; }
  .cr-lu-opp { white-space: normal; overflow-wrap: normal; }
  .cr-lu-reply { grid-column: 1 / -1; flex-wrap: wrap; }
  .cr-lu-reply span { flex-basis: 100%; }
}

/* Team switcher on a player's page — pick a team to scope their stats, like
   the USTA Team Details dropdown. Reloads to /players/:id?team=<id>. */
.cr-team-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 20px;
}
.cr-team-switch-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--cr-text-muted);
  white-space: nowrap;
}
.cr-team-switch-select {
  flex: 1;
  min-width: 0;
  padding: 10px 38px 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cr-text);
  background-color: var(--cr-white);
  border: 1px solid var(--cr-border);
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.cr-team-switch-select:focus {
  outline: none;
  border-color: var(--cr-gold);
}

/* Profile pages (your own and any player's): a tighter vertical rhythm so
   partners, recent matches and the stat tables are reachable with much less
   scrolling. Scoped to the profile body classes so other pages are unchanged. */
body.cr-ctx-profiles-show .cr-section,
body.cr-ctx-profiles-player .cr-section { margin-bottom: 20px; }
body.cr-ctx-profiles-show .cr-section-title,
body.cr-ctx-profiles-player .cr-section-title { margin-bottom: 10px; }
body.cr-ctx-profiles-show .cr-lineup-facts,
body.cr-ctx-profiles-player .cr-lineup-facts { padding: 14px 18px; margin-bottom: 20px; }
body.cr-ctx-profiles-show .cr-pp,
body.cr-ctx-profiles-player .cr-pp { margin-bottom: 18px; }
body.cr-ctx-profiles-show .cr-team-switch,
body.cr-ctx-profiles-player .cr-team-switch { margin: 0 0 14px; }

/* "Sync your calendar" button row under the My Teams month calendar. */
.cr-cal-sync { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cr-cal-sync-note { font-size: 0.8rem; color: var(--cr-text-muted); }

/* Calendar events synced from Google: tennis ones highlighted in gold (the
   tennis-ball colour), personal events shown plain. */
.cr-cal-ev-tennis { background: #fdf6e3; box-shadow: inset 3px 0 0 var(--cr-gold); }
.cr-cal-ev-ball { font-size: 0.85em; }
.cr-cal-tennis-ink { color: var(--cr-gold); font-weight: 700; }

/* Team page Subs tab: name + level + note | how often subbed | one button. */
.cr-subs-intro { font-size: 0.86rem; color: var(--cr-text-muted); margin: 6px 0 14px; }
.cr-subs-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; margin-bottom: 14px; }
.cr-subs-input { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--cr-border); border-radius: 10px; font: inherit; font-size: 0.9rem; background: var(--cr-card); }
.cr-subs-list { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; overflow: hidden; }
.cr-subs-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 124px; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--cr-border); }
.cr-subs-row:first-child { border-top: 0; }
.cr-subs-who { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.cr-subs-name { font-weight: 700; color: var(--cr-text); }
.cr-subs-level { font-size: 0.8rem; font-weight: 600; color: var(--cr-teal-deep); }
.cr-subs-note { font-size: 0.8rem; color: var(--cr-text-muted); }
.cr-subs-played { font-size: 0.82rem; color: var(--cr-text-muted); }
.cr-subs-action { display: flex; justify-content: flex-end; }
.cr-subs-action form { margin: 0; }
.cr-subs-action .cr-btn { width: 124px; justify-content: center; white-space: nowrap; }
@media (max-width: 600px) {
  .cr-subs-add { grid-template-columns: 1fr; }
  .cr-subs-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cr-subs-played { grid-column: 1; grid-row: 2; }
  .cr-subs-action { grid-column: 2; grid-row: 1 / span 2; }
}

/* Team page schedule header: Sync scores (league-site teams) + Add Match. */
.cr-sched-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cr-sync { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cr-sync form { margin: 0; }
.cr-sync-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.cr-sync-btn[disabled] { opacity: 0.6; cursor: default; }
.cr-sync-note { font-size: 0.78rem; color: var(--cr-text-muted); white-space: nowrap; }
@media (max-width: 600px) {
  .cr-sched-actions, .cr-sync { justify-content: flex-start; }
}

/* Ratings: All players / Teams tabs. The tabs span the page like the cards. */
.cr-rp-tabs { max-width: none; margin: 0 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
.cr-rp-team { margin-bottom: 10px; }
.cr-rp-team-head { cursor: pointer; list-style: none; }
.cr-rp-team-head::-webkit-details-marker { display: none; }
.cr-rp-team-head::after { content: "▾"; color: var(--cr-teal-deep); margin-left: 8px; transition: transform 0.15s; }
.cr-rp-team[open] .cr-rp-team-head::after { transform: rotate(180deg); }
.cr-rp-team:not([open]) .cr-rp-team-head { border-bottom: 0; }
.cr-rp-team-count { margin-left: auto; font-size: 0.82rem; color: var(--cr-text-muted); }
.cr-rp-rank { font-weight: 700; color: var(--cr-teal-deep); }
.cr-rp-unranked td { color: var(--cr-text-muted); }
/* Ranked tables: a slim # column; the gap after the name moves to column 2. */
.cr-rp-ranked th:first-child, .cr-rp-ranked td:first-child { width: 1%; padding-left: 14px; padding-right: 4px; }
@media (min-width: 601px) {
  .cr-rp-ranked td:nth-child(2), .cr-rp-ranked th:nth-child(2) { padding-right: 28px; }
}
/* Phones: the # column shifts every column right by one, so restate the
   fixed widths: # | player | level | record | win %; Last played drops. */
@media (max-width: 600px) {
  .cr-rp-ranked th:first-child, .cr-rp-ranked td:first-child {
    width: 9%; padding-left: 10px; padding-right: 2px; overflow: visible; text-overflow: clip;
  }
  .cr-rp-ranked th:nth-child(2), .cr-rp-ranked td:nth-child(2) {
    width: 39%; display: table-cell; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cr-rp-ranked th:nth-child(3), .cr-rp-ranked td:nth-child(3) { width: 18%; }
  .cr-rp-ranked th:nth-child(4), .cr-rp-ranked td:nth-child(4) { width: 18%; }
  .cr-rp-ranked th:nth-child(5), .cr-rp-ranked td:nth-child(5) { width: 16%; display: table-cell; }
  .cr-rp-ranked th:nth-child(6), .cr-rp-ranked td:nth-child(6) { display: none; }
}

/* Profile: what the stats count, right under each stats heading. */
.cr-stats-scope {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--cr-text-muted);
  margin: -4px 0 12px;
}

/* Team hero: "5 played · 2 need scores · 12 to play" under the stats. */
.cr-hero-breakdown {
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.2px;
}
.cr-hero-breakdown-note { margin-top: 2px; color: rgba(255, 255, 255, 0.55); }

/* Profile stats tables (5 columns) fit a phone without a sideways swipe. */
.cr-adv.cr-adv-compact { min-width: 0; }
@media (max-width: 480px) {
  .cr-adv.cr-adv-compact th, .cr-adv.cr-adv-compact td { padding: 10px 6px; }
  .cr-adv.cr-adv-compact .cr-adv-rowhead { padding-left: 12px !important; }
}

/* Team schedule: calendar entry → "Make this a match" (captains). */
.cr-sched-event-note { font-size: 0.8rem; color: var(--cr-text-muted); line-height: 1.45; margin: 4px 0 10px; }
.cr-sched-event .cr-sched-actions form { margin: 0; }
.cr-chip-btn-primary { background: var(--cr-teal-deep); border-color: var(--cr-teal-deep); color: #fff; font-weight: 700; cursor: pointer; }
.cr-chip-btn-primary:hover { filter: brightness(1.05); }

/* Profile League Match History: note + Refresh (the link lives in Settings). */
.cr-lmh-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cr-lmh-controls form { margin: 0; flex-shrink: 0; }
@media (max-width: 480px) {
  .cr-lmh-controls { flex-direction: column; align-items: flex-start; }
}
.cr-founder-links { gap: 8px; }
.cr-pp-metric-none { text-align: right; line-height: 1.3; }
.cr-playing-stat-value-none { color: var(--cr-text-light); }
.cr-ps-col-muted { color: var(--cr-text-light); font-weight: 600; }
.cr-ps-min-note { font-size: 0.75rem; color: var(--cr-text-light); margin-top: 2px; }
.cr-settings .cr-deltri-btn { min-width: 112px; justify-content: center; text-align: center; }

/* Admin: Possible duplicates (merge two records of one person). */
.cr-mem-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cr-dup-list { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; }
.cr-dup { border: 1px solid var(--cr-border); border-radius: 12px; padding: 12px 14px; background: var(--cr-card); }
.cr-dup-reason { font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cr-teal-deep); margin-bottom: 8px; }
.cr-dup-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cr-dup-side { border: 1px solid #eef1f5; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.cr-dup-name { font-weight: 700; overflow-wrap: anywhere; }
.cr-dup-name a { color: var(--cr-text); text-decoration: none; }
.cr-dup-meta { font-size: 0.78rem; color: var(--cr-text-muted); margin-top: 3px; overflow-wrap: anywhere; }
.cr-dup-tag { display: inline-block; margin-top: 8px; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--cr-text-muted); }
.cr-dup-side:first-child .cr-dup-tag { background: rgba(24, 39, 64, 0.12); color: var(--cr-teal-deep); }
.cr-dup-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cr-dup-keep-label { font-size: 0.8rem; font-weight: 600; }
.cr-dup-radio { font-size: 0.85rem; display: inline-flex; align-items: center; gap: 4px; }
.cr-dup-btn { margin-left: auto; min-width: 96px; justify-content: center; }
.cr-dup-blocked { font-size: 0.8rem; color: var(--cr-red); margin-top: 10px; }
@media (max-width: 520px) {
  .cr-dup-sides { grid-template-columns: 1fr; }
  .cr-dup-btn { margin-left: 0; width: 100%; }
}
.cr-dup-intro { margin-bottom: 12px; }
@media (max-width: 520px) {
  .cr-dup-list { padding: 0 10px 12px; }
  .cr-dup { padding: 10px; }
  .cr-dup-form { flex-direction: column; align-items: stretch; gap: 6px; }
}
/* Match History: one date width, so opponent names line up row to row. */
.cr-match-date.cr-mh-date { width: 76px; min-width: 76px; flex: 0 0 76px; padding: 8px 6px; text-align: center; }
.cr-match-date.cr-pp-team-badge { width: 92px; min-width: 92px; flex: 0 0 92px; padding: 8px 4px; text-align: center; }
@media (max-width: 480px) {
  .cr-match-date.cr-pp-team-badge { width: 70px; min-width: 70px; flex: 0 0 70px; padding: 7px 2px; }
  .cr-match-date.cr-pp-team-badge .cr-match-date-month { font-size: 0.55rem !important; letter-spacing: 0.3px; }
  .cr-match-date.cr-mh-date { width: 66px; min-width: 66px; flex: 0 0 66px; }
}

/* Players & Teams: past seasons fold away under their own heading. */
.cr-lookup-past > summary { cursor: pointer; list-style: none; }
.cr-lookup-past > summary::-webkit-details-marker { display: none; }
.cr-lookup-past > summary::after { content: "▾"; color: var(--cr-gold); margin-left: 8px; transition: transform 0.15s; }
.cr-lookup-past[open] > summary::after { transform: rotate(180deg); }
.cr-lookup-past:not([open]) > summary { border-bottom: 0; }

/* Ratings: the rank rule sits right above each table, not after 200 rows. */
.cr-rp-rule { font-size: 0.78rem; color: var(--cr-text-muted); line-height: 1.45; margin: 0; padding: 10px 18px 8px; }

/* Lineups: current teams with nothing ahead, named under the list. */
.cr-lu-none { font-size: 0.82rem; color: var(--cr-text-muted); line-height: 1.5; margin: 14px 2px 0; }
.cr-lu-none a { color: var(--cr-teal-deep); font-weight: 600; text-decoration: none; }

/* Match page: Scores heading with its one Enter / Edit scores button. */
.cr-match-scores-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-match-scores-btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.cr-upload-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Enter Results: number boxes per set, a Tie option, a Save bar that stays put. */
.cr-se-sets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cr-se-set { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cr-se-set-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--cr-text-muted); }
.cr-se-set-boxes { display: flex; align-items: center; gap: 4px; }
.cr-se-box {
  width: 100%; min-width: 0; height: 44px; text-align: center; font-size: 1.15rem; font-weight: 700;
  border: 1px solid var(--cr-border); border-radius: 10px; background: var(--cr-card); color: var(--cr-text);
}
.cr-se-box::placeholder { font-size: 0.72rem; font-weight: 500; color: var(--cr-text-light); }
.cr-se-box:focus { outline: none; border-color: var(--cr-teal-deep); box-shadow: 0 0 0 3px rgba(24, 39, 64, 0.15); }
.cr-se-dash { color: var(--cr-text-light); font-weight: 700; }
.cr-se-savebar {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  background: var(--cr-card); border-top: 1px solid var(--cr-border); padding: 12px 0; margin-top: 18px;
}
.cr-se-savebar-sum { margin-right: auto; font-size: 0.85rem; font-weight: 700; color: var(--cr-text); }
@media (max-width: 720px) {
  .cr-se-savebar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding: 10px 0; }
  .cr-se-sets { gap: 8px; }
}
/* Enter Results card: players and opponents fill the card, edges line up. */
.cr-line-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cr-line-players .cr-line-players-label { grid-column: 1 / -1; }
.cr-line-players .cr-select { width: 100%; max-width: none; margin: 0; }
.cr-line-players:has(> select:only-of-type) { grid-template-columns: minmax(0, 1fr); }
.cr-line-opponents .cr-input {
  display: block; width: 100%; height: 40px; padding: 0 12px; font-size: 0.95rem;
  border: 1px solid var(--cr-border); border-radius: 10px; background: var(--cr-card); color: var(--cr-text);
}
.cr-se-sets { max-width: 560px; }
@media (max-width: 480px) { .cr-line-players { grid-template-columns: minmax(0, 1fr); } }
.cr-line-opponents { margin-top: 12px; }
/* The player's one-line page reads like Enter Results. */
body.cr-ctx-matches-edit_my_line .cr-page-title,
body.cr-ctx-matches-edit_my_line .cr-line-label,
body.cr-ctx-matches-edit_my_line .cr-line-players-label { color: var(--cr-text); }
body.cr-ctx-matches-edit_my_line .cr-form-help { color: var(--cr-text-muted); }
/* "Entered by Jaci · Nov 18" under a line on the scoresheet. */
.cr-sheet-entered { margin-left: auto; font-size: 0.7rem; font-weight: 500; color: var(--cr-text-light); text-transform: none; letter-spacing: 0; }

/* Lineup status: a saved draft (players can't see it) or posted. */
.cr-lineup-status { font-size: 0.85rem; line-height: 1.45; padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; }
.cr-lineup-status.is-draft { background: rgba(24, 39, 64, 0.12); color: #6b5216; border: 1px solid rgba(24, 39, 64, 0.35); }
.cr-lineup-status.is-posted { background: rgba(24, 39, 64, 0.08); color: #1b2a4a; border: 1px solid rgba(24, 39, 64, 0.25); }
.cr-lineup-status a { color: inherit; font-weight: 700; }
.cr-sched-pill.cr-sched-pill-draft { color: #1b2a4a; background: rgba(24, 39, 64, 0.15); }
.cr-lu-status.is-draft { background: rgba(24, 39, 64, 0.15); color: #1b2a4a; }

/* Enter scores: Win / Loss / Tie as three even buttons. */
.cr-result-toggle.cr-result-toggle-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cr-result-toggle-3 .cr-result-option { justify-content: center; padding: 14px 8px; }
.cr-result-tie:has(input:checked) { border-color: #64748b; background: #f1f5f9; color: #1b2a4a; }
body.cr-ctx-matches-edit_results .cr-result-option:has(input:checked) .cr-result-label { color: inherit; }

/* Set Lineup: each line's start time (split court times). */
.cr-lineup-time { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.cr-lineup-time > label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--cr-text-muted); }
.cr-lineup-time .cr-lineup-time-select { width: auto; max-width: 220px; margin: 0; }
.cr-lineup-time-other { width: 130px; height: 36px; padding: 0 10px; border: 1px solid var(--cr-border); border-radius: 8px; font-size: 0.9rem; }
/* Upcoming card: "Time & place TBD" when neither is known yet. */
.cr-my-week-tbd { font-size: 0.75rem; color: var(--cr-text-light); font-style: italic; }

/* Names are never cut off with "…" (Tara, Nov 18): they wrap to a second line. */
.cr-sb-team-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; overflow-wrap: anywhere; }
.cr-dash-cal-chip, .cr-dash-cal-full .cr-dash-cal-chip {
  white-space: normal; overflow: hidden; text-overflow: clip; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25;
}
@media (max-width: 720px) {
  /* Phone cells are ~40px: keep words whole (no "Oppon / ent"); tap a day for the full list. */
  .cr-dash-cal-chip, .cr-dash-cal-full .cr-dash-cal-chip { overflow-wrap: normal; word-break: normal; -webkit-line-clamp: 2; }
}
.cr-lookup-tbl td.cr-lookup-wide { white-space: normal; overflow: visible; text-overflow: clip; }
/* Profile: three-set scores fit on one line; Best Partner name + numbers on two tidy lines. */
.cr-ps-col-score { width: 112px; white-space: nowrap; font-size: 0.85rem; }
.cr-fact-name { display: block; }
.cr-fact-sub { display: block; margin-top: 2px; color: var(--cr-text-muted); font-weight: 500; font-size: 0.8rem; }
@media (max-width: 400px) { .cr-ps-col-score { width: 92px; font-size: 0.78rem; } }
/* Sidebar league tags read like the league headings (DEL-TRI, BUX-MONT). */
.cr-sb-team small { text-transform: uppercase; letter-spacing: 0.4px; }

/* Calendar (Tara's review, Nov 18): shorter day cells, the colour key at
   the top, today's number inside its cell. */
.cr-dash-cal-full .cr-dash-cal-day { min-height: 70px; }
.cr-dash-cal-legend.cr-dash-cal-legend-top { margin: 4px 0 10px; justify-content: center; font-size: 0.74rem; gap: 16px; }
.cr-dash-cal-full .cr-dash-cal-day-today .cr-dash-cal-day-num { margin: 1px 1px 0 0; }
@media (max-width: 720px) {
  .cr-dash-cal-full .cr-dash-cal-day { min-height: 58px; }
  .cr-dash-cal-legend.cr-dash-cal-legend-top { font-size: 0.7rem; gap: 12px; }
}

/* ============================================================
   Nov 18 2026 (Tara): squiggle pattern, team "⋯" menu, footer.
   ============================================================ */

/* The net in gold on the navy team hero (Tara, Nov 18 2026). */
.cr-team-hero::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 60%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 300' preserveAspectRatio='xMaxYMid slice'%3E%3Cpath d='M0 46V262M16 46V262M32 46V262M48 46V262M64 46V262M80 46V262M96 46V262M112 46V262M128 46V262M144 46V262M160 46V262M176 46V262M192 46V262M208 46V262M224 46V262M240 46V262M256 46V262M272 46V262M288 46V262M304 46V262M320 46V262M336 46V262M352 46V262M368 46V262M384 46V262M400 46V262M416 46V262M432 46V262M448 46V262M464 46V262M480 46V262M496 46V262M512 46V262M528 46V262M544 46V262M560 46V262M576 46V262M592 46V262M0 60H600M0 76H600M0 92H600M0 108H600M0 124H600M0 140H600M0 156H600M0 172H600M0 188H600M0 204H600M0 220H600M0 236H600M0 252H600' stroke='%23e2bd62' stroke-opacity='0.22' stroke-width='1.2'/%3E%3Cpath d='M0 46H600' stroke='%23e2bd62' stroke-opacity='0.55' stroke-width='9'/%3E%3Cpath d='M0 262H600' stroke='%23e2bd62' stroke-opacity='0.3' stroke-width='2'/%3E%3Crect x='600' y='28' width='10' height='272' rx='3' fill='%23e2bd62' fill-opacity='0.5'/%3E%3Ccircle cx='605' cy='28' r='8' fill='%23e2bd62' fill-opacity='0.55'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 50%);
          mask-image: linear-gradient(to right, transparent 0%, #000 50%);
}
@media (max-width: 720px) {
  /* Phones: the text fills the hero, so keep the net faint. */
  .cr-team-hero::after { width: 55%; opacity: 0.6; }
}
/* Tara's court photo as one full-page background (Nov 18 2026, 3rd try):
   the WHOLE court, very faded, pinned behind the content and sized to fit
   the screen, so it always reads as a court (never a cropped band) and
   stays put while the page scrolls. A fixed layer (not background-
   attachment: fixed) so it also works on iPhones. Sideways court on wide
   screens, upright court on tall ones. */
.cr-has-sb .cr-shell-main { position: relative; isolation: isolate; }
.cr-has-sb .cr-shell-main::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  inset: var(--cr-hh) 0 0 0;
  background: url("/assets/court-tall-2b70ff53.jpg") center 58% / contain no-repeat;   /* the court stands up and down, net across (Tara) */
  opacity: 0.2;
}
@media (min-width: 1000px) {
  .cr-has-sb .cr-shell-main::before { left: var(--cr-sb-w); inset-block: calc(var(--cr-hh) + 36px) 24px; }
}
@media (max-aspect-ratio: 1/1) {
  /* Phones and upright tablets; leave room for the bottom tab bar. */
  .cr-has-sb .cr-shell-main::before { inset: calc(var(--cr-hh) + 24px) 8px 84px 8px; }
}
/* Dark pages keep their own background. */
body.cr-ctx-division_teams-show .cr-shell-main::before { display: none; }

/* Team options "⋯" menu (Archive team / Delete team). */
.cr-team-menu { position: relative; }
.cr-team-menu-btn {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 34px; border-radius: 999px; border: 1px solid var(--cr-border); background: var(--cr-card);
  color: var(--cr-text); font-size: 1.3rem; line-height: 1; font-weight: 700; user-select: none;
}
.cr-team-menu-btn::-webkit-details-marker { display: none; }
.cr-team-menu[open] .cr-team-menu-btn, .cr-team-menu-btn:hover { border-color: var(--cr-gold); }
.cr-team-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 260px; max-width: calc(100vw - 32px);
  background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 30px rgba(10, 22, 40, 0.16);
}
.cr-team-menu-list form { margin: 0; }
.cr-team-menu-item {
  display: block; width: 100%; text-align: left; padding: 9px 10px 2px; border: 0; background: none;
  font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--cr-text); cursor: pointer; border-radius: 8px;
}
.cr-team-menu-item:hover { color: var(--cr-teal); }
.cr-team-menu-danger { color: #1b2a4a; }
.cr-team-menu-danger:hover { color: #1b2a4a; }
.cr-team-menu-off { color: var(--cr-text-light); cursor: default; }
.cr-team-menu-off:hover { color: var(--cr-text-light); }
.cr-team-menu-note { margin: 0; padding: 2px 10px 9px; font-size: 0.76rem; line-height: 1.35; color: var(--cr-text-muted); }
.cr-team-menu-note + form, .cr-team-menu-note + .cr-team-menu-item { border-top: 1px solid var(--cr-border); }

/* Simple footer on every signed-in page, in the same centered column. */
.cr-app-footer { padding: 8px 24px 28px; }
.cr-app-footer-inner {
  max-width: var(--cr-col); margin: 0 auto; padding-top: 16px; border-top: 1px solid var(--cr-border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  font-size: 0.82rem; color: var(--cr-text-muted);
}
.cr-app-footer-brand { font-weight: 700; color: var(--cr-text); }
.cr-app-footer-year { font-weight: 400; color: var(--cr-text-muted); margin-left: 4px; }
.cr-app-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cr-app-footer-links a { color: var(--cr-text-muted); text-decoration: none; }
.cr-app-footer-links a:hover { color: var(--cr-teal); }
@media (max-width: 720px) {
  /* Above the fixed bottom tab bar, centered. */
  .cr-app-footer { padding: 8px 16px 96px; }
  .cr-app-footer-inner { justify-content: center; text-align: center; }
  .cr-app-footer-links { justify-content: center; }
}
/* The footer follows the page, so the page needs less empty space below. */
.cr-has-sb .cr-main { padding-bottom: 40px; }
@media (max-width: 720px) { .cr-has-sb .cr-main { padding-bottom: 24px; } }

/* Friendlies tab: recent friendlies | who you play with | how it works,
   three even boxes under the upcoming list (stacked on phones). */
.cr-fr-more {
  max-width: var(--cr-col); margin: 26px auto 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start;
}
@media (max-width: 900px) { .cr-fr-more { grid-template-columns: minmax(0, 1fr); } }
.cr-fr-box { background: var(--cr-card); border: 1px solid var(--cr-border); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.cr-fr-box-title { margin: 0 0 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--cr-text); }
.cr-fr-box-empty { margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--cr-text-muted); }
.cr-fr-box-link { display: inline-block; margin-top: 10px; font-size: 0.84rem; font-weight: 700; color: var(--cr-teal); text-decoration: none; }
.cr-fr-recent, .cr-fr-partners { list-style: none; margin: 0; padding: 0; }
.cr-fr-recent li + li, .cr-fr-partners li + li { border-top: 1px solid var(--cr-border); }
.cr-fr-recent-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 0; text-decoration: none; color: inherit; }
.cr-fr-recent-row:hover .cr-fr-recent-title { color: var(--cr-teal); }
.cr-fr-recent-date { font-size: 0.78rem; font-weight: 700; color: var(--cr-gold-dark, #5f6b7e); white-space: nowrap; }
.cr-fr-recent-main { display: flex; flex-direction: column; min-width: 0; }
.cr-fr-recent-title { font-size: 0.9rem; font-weight: 700; color: var(--cr-text); }
.cr-fr-recent-sub { font-size: 0.78rem; color: var(--cr-text-muted); }
.cr-fr-partners li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.9rem; }
.cr-fr-partner-name { font-weight: 700; color: var(--cr-text); min-width: 0; }
.cr-fr-partner-n { color: var(--cr-text-muted); white-space: nowrap; font-size: 0.84rem; }
.cr-fr-steps { margin: 0; padding-left: 20px; font-size: 0.86rem; line-height: 1.45; color: var(--cr-text-muted); }
.cr-fr-steps li + li { margin-top: 8px; }
.cr-fr-steps strong { color: var(--cr-text); }

/* ============================================================
   Nov 18 2026, wasted-space follow-up (Tara).
   ============================================================ */

/* Calendar entries: the time on its own line, then who/what (up to 2 lines). */
.cr-dash-cal-chip, .cr-dash-cal-full .cr-dash-cal-chip {
  display: flex; flex-direction: column; gap: 0; -webkit-line-clamp: unset; white-space: normal;
}
.cr-dash-cal-chip-time { display: block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.2px; opacity: 0.85; white-space: nowrap; }
.cr-dash-cal-chip-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; line-height: 1.25;
}
@media (max-width: 720px) {
  /* Phone cells are ~40px wide: a short time ("10:30") and one line of name. */
  .cr-dash-cal-chip-time { font-size: 0.5rem; letter-spacing: 0; }
  .cr-dash-cal-chip-text { overflow-wrap: normal; word-break: normal; -webkit-line-clamp: 2; }
}

/* My Teams standings (computers): the team name column is capped so W/L sit
   right after it, then the last result, then the next match on two lines. */
.cr-st-last { white-space: nowrap; font-size: 0.84rem; color: var(--cr-text-muted); }
.cr-st-last-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px;
  border-radius: 6px; font-size: 0.7rem; font-weight: 800; color: #fff; background: var(--cr-text-muted); vertical-align: 1px;
}
.cr-st-last-w { background: #1b2a4a; }
.cr-st-last-l { background: #6b7688; }
.cr-st-last-t { background: #7d8899; }
.cr-st-last-score { font-weight: 700; color: var(--cr-text); margin-right: 4px; }
.cr-st-last-opp { display: block; margin: 2px 0 0 26px; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; }
.cr-home-st .cr-st-next { white-space: normal; }
.cr-st-next-date { display: block; }
.cr-st-next-opp { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--cr-text-muted); }
@media (min-width: 900px) {
  .cr-home-st th:nth-child(2) { width: 250px; }
  .cr-home-st th:nth-child(7) { width: 210px; }
  .cr-home-st th:nth-child(8) { width: auto; }
  .cr-home-st .cr-st-next { overflow: visible; }
}
/* Phones: no room for Last; Next keeps its two short lines. */
@media (max-width: 899px) {
  .cr-home-st .cr-st-last-h, .cr-home-st .cr-st-last { display: none; }
}
@media (max-width: 640px) {
  /* As before on phones: Win% and the next match stay hidden (Upcoming has them). */
  .cr-home-st thead th:nth-child(8), .cr-home-st tbody td:nth-child(8) { display: none; }
}

/* Friendlies tab (computers): upcoming friendlies two across; inside each
   card the place sits under the details so nothing is squeezed. */
@media (min-width: 900px) {
  .cr-my-week-list.cr-fr-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .cr-my-week-list.cr-fr-list > .cr-cu-row { margin: 0; }
  .cr-fr-list .cr-cu-row {
    grid-template-columns: 52px minmax(0, 1fr) 76px;
    grid-template-areas: "date info right" "date place right";
    column-gap: 16px; align-items: center;
  }
  .cr-fr-list .cr-cu-place:empty { display: none; }
  .cr-fr-list .cr-cu-place .cr-venue { margin-top: 6px; }
  /* A single friendly still fills the row instead of leaving half of it empty. */
  .cr-fr-list > .cr-cu-row:only-child { grid-column: 1 / -1; }
}

/* Profile: Win % by Line / Partner / Team side by side on computers. */
.cr-ps-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; align-items: start; }
@media (min-width: 900px) {
  .cr-ps-cols { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .cr-ps-col-card .cr-playing-stats-header, .cr-ps-col-card .cr-playing-stats-row { padding-left: 12px; padding-right: 12px; }
}

/* Team banner: the next match + recent form fill the right half on computers. */
.cr-hero-side {
  position: relative; z-index: 1; margin-top: 20px; padding: 16px 18px;
  background: rgba(10, 22, 40, 0.55); border: 1px solid rgba(226, 189, 98, 0.35); border-radius: 14px;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.cr-hero-side-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cr-gold-soft, #7d8899); }
.cr-hero-side-label-form { margin-top: 14px; }
.cr-hero-side-match { display: block; margin-top: 6px; color: #fff; text-decoration: none; }
.cr-hero-side-match:hover .cr-hero-side-opp { text-decoration: underline; }
.cr-hero-side-date { display: block; font-size: 0.86rem; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.cr-hero-side-opp { display: block; margin-top: 2px; font-size: 1.12rem; font-weight: 800; color: #fff; line-height: 1.25; }
.cr-hero-side-where { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); }
.cr-hero-side-tag { padding: 2px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; background: rgba(24, 39, 64, 0.25); color: #d6ecf9; }
.cr-hero-side-tag-away { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.85); }
.cr-hero-form { display: flex; gap: 6px; margin-top: 8px; }
.cr-hero-form-dot {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px;
  font-size: 0.74rem; font-weight: 800; color: #fff;
}
.cr-hero-form-w { background: #1b2a4a; }
.cr-hero-form-l { background: #6b7688; }
.cr-hero-form-t { background: #7d8899; color: #1f1600; }
@media (min-width: 900px) {
  .cr-team-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 28px; align-items: center; }
  .cr-hero-side { margin-top: 0; }
}

/* Ratings: a "Last 5" column of W/L dots, and your own USTA form in the hero. */
.cr-rp-form { white-space: nowrap; }
.cr-rp-form-dot {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-right: 3px;
  border-radius: 5px; font-size: 0.62rem; font-weight: 800; color: #fff;
}
.cr-rp-form-w { background: #1b2a4a; }
.cr-rp-form-l { background: #6b7688; }
.cr-rp-unranked td .cr-rp-form-dot { opacity: 0.75; }
@media (max-width: 600px) {
  .cr-rp-ranked th:nth-child(7), .cr-rp-ranked td:nth-child(7) { display: none; }
}
.cr-rp-hero-side {
  flex: 0 0 auto; min-width: 250px; padding: 14px 18px;
  background: rgba(10, 22, 40, 0.45); border: 1px solid rgba(226, 189, 98, 0.35); border-radius: 14px;
}
.cr-rp-hero-rec { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.cr-rp-hero-num { font-size: 1.6rem; font-weight: 800; color: #fff; }
.cr-rp-hero-pct { font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); }
.cr-rp-hero-link { display: inline-block; margin-top: 12px; font-size: 0.8rem; font-weight: 700; color: var(--cr-gold); text-decoration: none; }
.cr-rp-hero-link:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .cr-rp-hero { flex-direction: column; align-items: stretch; }
  .cr-rp-hero-side { min-width: 0; }
}
/* Lookup: team names never cut off; each wraps as a whole. */
.cr-lookup-team { display: inline-block; white-space: nowrap; max-width: 100%; overflow: visible; text-overflow: clip; }
.cr-lookup-tbl td.cr-lookup-wide { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important; }

/* =====================================================================
   SITE PALETTE (Tara, Nov 18 2026) — keep to this everywhere:
   light-blue page (from the court photo) + the faded court; white header
   with a navy wordmark and the gold ball tile; navy text & headings; navy
   primary buttons (white text); soft grey secondary text & borders; white
   rounded cards. Gold is an ACCENT only: logo ball, Enter scores, active
   states, win chips. Results: W = gold chip/navy W, L = light grey/navy L,
   T = white with navy outline/navy T. NO red, green or bright yellow, and
   no grid or squares patterns.
   ===================================================================== */
:root {
  --cr-navy: #1b2a4a;
  --cr-page: #eaf5fc;          /* the court blue, very light */
  --cr-hero: #d6ecf9;          /* banners: the court blue, lighter */
  --cr-black: #1b2a4a;
  --cr-black-soft: #24344f;
  --cr-navy-page: #eaf5fc;
  --cr-bg: #eaf5fc;
  --cr-header-bg: #ffffff;
  /* Old "gold" spots (labels, dates, borders) become soft slate; real gold
     is --cr-accent, used ONLY for the logo ball, Enter scores, active
     states and win chips. */
  --cr-gold: #7d8899;
  --cr-gold-soft: #9aa5b4;
  --cr-gold-bright: #ffffff;
  --cr-accent: #c9a227;
  --cr-accent-tint: #f6eed8;
  --cr-teal: #1b2a4a;
  --cr-teal-deep: #1b2a4a;
  --cr-teal-tint: rgba(24, 39, 64, 0.07);
  --cr-text: #1b2a4a;
  --cr-text-muted: #5f6b7e;
  --cr-text-light: #7d8899;
  --cr-border: #dbe3ec;
  --cr-green: #1b2a4a;
  --cr-red: #6b7688;
  --cr-win-bg: #dcb862;        /* W chip: gold, navy letter */
  --cr-loss-bg: #e6eaf0;       /* L chip: light grey, navy letter */
}
html body, html body[class] { background: var(--cr-page); color: var(--cr-text); }

/* Header: white, navy wordmark, gold ball tile. */
.cr-header { background: var(--cr-card); border-bottom: 1px solid var(--cr-border); box-shadow: 0 1px 8px rgba(24, 39, 64, 0.05); }
.cr-brand, .cr-brand-text, .cr-brand-gold { color: var(--cr-navy); }
.cr-brand-your { color: var(--cr-text-light); }
.cr-header .cr-header-search-icon, .cr-sb-burger { color: var(--cr-navy); border-color: var(--cr-border); background: var(--cr-card); }
.cr-header .cr-header-pill { color: var(--cr-navy); border-color: var(--cr-border); background: var(--cr-card); }
.cr-header .cr-header-signup { background: var(--cr-navy); color: #fff; border-color: var(--cr-navy); }

/* Left menu: white, navy text; the page you're on is marked in gold. */
.cr-sb { background: var(--cr-card); color: var(--cr-navy); border-right: 1px solid var(--cr-border); }
.cr-sb-user { background: var(--cr-card); border-color: var(--cr-border); color: var(--cr-navy); }
.cr-sb-user:hover, .cr-sb-menu.cr-menu-open .cr-sb-user { background: var(--cr-page); }
.cr-sb-avatar { background: var(--cr-navy); color: #fff; }
.cr-sb-name, .cr-sb-caret { color: var(--cr-navy); }
.cr-sb-meta, .cr-sb-h, .cr-sb-team small { color: var(--cr-text-light); }
.cr-sb-search { background: var(--cr-page); color: var(--cr-text-light); }
.cr-sb-search input { color: var(--cr-navy); }
.cr-sb-search input::placeholder { color: var(--cr-text-light); }
.cr-sb-link { color: var(--cr-navy); }
.cr-sb-link:hover { background: var(--cr-page); color: var(--cr-navy); }
.cr-sb-link.is-on { background: var(--cr-accent-tint); color: var(--cr-navy); box-shadow: inset 3px 0 0 var(--cr-accent); }
.cr-sb-newbtn { background: var(--cr-navy); color: #fff; }
.cr-sb-signout { color: var(--cr-navy); }

/* Buttons: primary = navy with white text; secondary = white with a grey border. */
.cr-btn-gold, .cr-btn-primary { background: var(--cr-navy); color: #fff; border-color: var(--cr-navy); box-shadow: none; }
.cr-btn-gold:hover, .cr-btn-primary:hover { background: var(--cr-black-soft); color: #fff; }
.cr-btn-outline, .cr-chip-btn { background: var(--cr-card); color: var(--cr-navy); border-color: var(--cr-border); }
.cr-btn-outline:hover, .cr-chip-btn:hover { border-color: var(--cr-navy); color: var(--cr-navy); background: var(--cr-card); }
.cr-chip-btn.cr-chip-danger, .cr-team-menu-danger { color: var(--cr-navy); border-color: var(--cr-border); }
/* "Enter scores" is the one gold button. */
.cr-awaiting-badge-link, a.cr-btn[href*="edit_results"], .cr-enter-results-link { background: var(--cr-accent); color: var(--cr-navy) !important; border-color: var(--cr-accent); }
.cr-enter-results-link { padding: 3px 10px; border-radius: 999px; font-weight: 700; text-decoration: none; }

/* Active states are gold. */
.cr-subtab-active, body.cr-ctx-teams-show .cr-subtab-active { color: var(--cr-navy); border-bottom-color: var(--cr-accent); box-shadow: inset 0 -2px 0 var(--cr-accent); }
.cr-home-tab-active, .cr-home-tab-active:hover { background: var(--cr-card); color: var(--cr-navy); box-shadow: inset 0 -2px 0 var(--cr-accent), 0 1px 3px rgba(24, 39, 64, 0.08); }
.cr-home-tabs { border-color: var(--cr-border); background: var(--cr-card); }
.cr-home-tab { color: var(--cr-text-muted); }
.cr-seg-btn-active, body.cr-ctx-teams-show .cr-seg-btn-active { box-shadow: inset 0 -2px 0 var(--cr-accent), 0 1px 2px rgba(10, 22, 40, 0.08); }
.cr-dash-cal-full .cr-dash-cal-day-today { border-color: var(--cr-accent); }

/* Banners: light blue with navy text — no dark blocks, no grid or net pattern. */
.cr-team-hero, .cr-rp-hero { background: var(--cr-hero); color: var(--cr-navy); box-shadow: none; border: 1px solid rgba(24, 39, 64, 0.06); border-bottom: 1px solid rgba(24, 39, 64, 0.06); }
.cr-team-hero::before, .cr-team-hero::after { display: none; content: none; }
.cr-team-hero-label, .cr-rp-eyebrow { color: var(--cr-text-muted); }
.cr-team-hero-name, .cr-rp-name, .cr-hero-stat-value { color: var(--cr-navy); }
.cr-team-hero-sub, .cr-rp-sub, .cr-hero-stat-label, .cr-hero-breakdown, .cr-hero-breakdown-note, .cr-team-colors-text { color: var(--cr-text-muted); }
.cr-hero-side, .cr-rp-hero-side { background: var(--cr-card); border: 1px solid var(--cr-border); -webkit-backdrop-filter: none; backdrop-filter: none; }
.cr-hero-side-label { color: var(--cr-text-light); }
.cr-hero-side-match, .cr-hero-side-opp, .cr-rp-hero-num { color: var(--cr-navy); }
.cr-hero-side-date, .cr-hero-side-where, .cr-rp-hero-pct { color: var(--cr-text-muted); }
.cr-hero-side-tag, .cr-hero-side-tag-away { background: var(--cr-page); color: var(--cr-navy); }
.cr-rp-hero-link { color: var(--cr-navy); text-decoration: underline; text-decoration-color: var(--cr-accent); }
.cr-rp-hero-level { border-color: var(--cr-border); background: var(--cr-card); color: var(--cr-navy); }

/* Table title bars: white with navy text (were dark). */
.cr-standings-head { background: #fff; color: var(--cr-navy); border-bottom: 1px solid var(--cr-border); }
.cr-standings-head-title { color: var(--cr-navy); }
.cr-standings-head-season { color: var(--cr-text-light); }
.cr-standings-wrap { background: var(--cr-card); }

/* Phone tab bar: white. */
.cr-bottom-nav { background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--cr-border); box-shadow: 0 -2px 12px rgba(24, 39, 64, 0.06); }
.cr-bottom-nav a, .cr-bottom-nav button, .cr-bottom-nav .cr-bnav-label, .cr-bottom-nav svg { color: var(--cr-text-muted); }
.cr-bottom-nav .cr-bnav-active, .cr-bottom-nav .cr-bnav-active .cr-bnav-label, .cr-bottom-nav .cr-bnav-active svg { color: var(--cr-navy); }
.cr-bottom-nav::before { background: var(--cr-accent); }

/* Calendar: matches navy with white text; clinics/friendlies/others soft. */
.cr-dash-cal-chip-match    { background: var(--cr-navy); color: #fff; border-left-color: var(--cr-navy); }
.cr-dash-cal-chip-practice, .cr-dash-cal-chip-clinic { background: var(--cr-page); color: var(--cr-navy); border-left-color: #7d8899; }
.cr-dash-cal-chip-friendly { background: var(--cr-card); color: var(--cr-navy); border-left-color: #a9c8e2; box-shadow: inset 0 0 0 1px var(--cr-border); }
.cr-dash-cal-chip-other    { background: #f1f3f6; color: var(--cr-navy); border-left-color: #b7c0cc; }
.cr-dash-cal-dot-match { background: var(--cr-navy); }
.cr-dash-cal-dot-clinic, .cr-dash-cal-dot-practice { background: #7d8899; }
.cr-dash-cal-dot-friendly { background: #a9c8e2; }

/* Results: W gold / L light grey / T white with navy outline — navy letters. */
.cr-result-badge-win, .cr-hero-form-w, .cr-rp-form-w, .cr-st-last-w, .cr-chart-recent-win, .cr-st-dot-w, .cr-rp-wl-w, .cr-adv-win
  { background: var(--cr-win-bg); color: var(--cr-navy); border: 1px solid var(--cr-win-bg); }
.cr-result-badge-loss, .cr-hero-form-l, .cr-rp-form-l, .cr-st-last-l, .cr-chart-recent-loss, .cr-st-dot-l, .cr-rp-wl-l, .cr-adv-loss
  { background: var(--cr-loss-bg); color: var(--cr-navy); border: 1px solid var(--cr-loss-bg); }
.cr-result-badge-tie, .cr-hero-form-t, .cr-st-last-t, .cr-st-dot-t, .cr-chart-recent-tie
  { background: var(--cr-card); color: var(--cr-navy); border: 1.5px solid var(--cr-navy); }
.cr-st-w, .cr-st-l, .cr-st-pct-good, .cr-st-pct-bad, .cr-result-win, .cr-result-loss, .cr-result-tie,
.cr-line-win, .cr-line-loss, .cr-year-win, .cr-year-loss { color: var(--cr-navy); }
.cr-st-l, .cr-st-pct-bad, .cr-result-loss, .cr-line-loss, .cr-year-loss { color: var(--cr-text-muted); }

/* Sign-in / sign-up and the opponent drill-down were dark pages: now light. */
body.cr-ctx-sessions-new .cr-landing-headline, .cr-dt-name { color: var(--cr-navy); }
body.cr-ctx-sessions-new .cr-landing-tagline, .cr-dt-sub,
body.cr-ctx-sessions-new .cr-landing-footer,
body.cr-ctx-sessions-new .cr-admin-reset-label,
body.cr-ctx-sessions-new .cr-admin-reset-note, .cr-dt-page .cr-back-link a { color: var(--cr-text-muted); }
.cr-dt-sub strong { color: var(--cr-navy); }

/* Sidebar league dots and team colour dots stay (they're the team's own colours). */

/* The logo ball tile keeps its gold. */
.cr-brand-ball, .cr-logo-mark { background: linear-gradient(135deg, #c9a227, #e2c57e); box-shadow: 0 3px 12px rgba(201, 162, 74, 0.35); }
/* Table header rows: light blue, not cream. */
.cr-standings thead th, .cr-standings thead tr { background: #f3f8fc; }
.cr-standings tbody tr.cr-st-row:first-child td { background: transparent; }
.cr-header .cr-header-search-icon { color: var(--cr-navy); opacity: 1; }
/* Upcoming / Friendlies card labels: navy-grey, not gold. */
.cr-my-week-league-label, .cr-my-week-day-name, .cr-my-week-month, .cr-fr-recent-date { color: var(--cr-text-muted); }
.cr-dash-cal-full .cr-dash-cal-day-today .cr-dash-cal-day-num { background: var(--cr-accent); color: var(--cr-navy); }
.cr-header-search-icon, .cr-header-search-icon svg { color: var(--cr-navy) !important; stroke: currentColor; opacity: 1 !important; }
/* Top-bar search on the white header: navy magnifier, light-blue field. */
.cr-header-search input {
  color: var(--cr-navy); border-color: var(--cr-border);
  background: var(--cr-page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%23182740' stroke-width='2.4'/%3E%3Cpath d='M16.5 16.5 21 21' stroke='%23182740' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 12px center;
}
.cr-header-search input:not(:focus):placeholder-shown { background-position: center; background-size: 16px; }
.cr-header-search input::placeholder { color: var(--cr-text-light); }
.cr-header-search input:focus { border-color: var(--cr-accent); background-color: #fff; }
.cr-header-search-icon { border-color: var(--cr-border) !important; }
/* Feature tiles (sign-in page): every icon navy on light blue. */
[class*="cr-tone-"] { color: var(--cr-navy) !important; background: #e3f1fb !important; }
/* Sign-in / sign-up: navy submit button, navy headline. */
.cr-login-card input[type="submit"], .cr-auth-card input[type="submit"], form input[type="submit"].cr-btn { background: var(--cr-navy); color: #fff; border-color: var(--cr-navy); }
.cr-login-card input[type="submit"]:hover, .cr-auth-card input[type="submit"]:hover { background: var(--cr-black-soft); color: #fff; }
.cr-landing-headline-gold { color: var(--cr-navy); }
/* Things that were gold and aren't one of the four gold spots: navy or light blue. */
.cr-header-signup { background: var(--cr-navy) !important; color: #fff !important; }
.cr-popup-confirm, .cr-auth-submit, .cr-match-date, .cr-badge-admin, .cr-standings-you-badge, .cr-player-avatar { background: var(--cr-navy); color: #fff; }
.cr-popup-confirm:hover, .cr-auth-submit:hover { background: var(--cr-black-soft); color: #fff; }
.cr-auth-logo { background: linear-gradient(135deg, #c9a227, #e2c57e); }
.cr-roster-role-captain { background: #e3f1fb; color: var(--cr-navy); }
.cr-chart-split-left, .cr-bar-fill { background: var(--cr-navy); }
.cr-cal-btn:hover { background: #e3f1fb; color: var(--cr-navy); }
.cr-bnav-active::before { background: linear-gradient(90deg, transparent, var(--cr-accent), transparent); }
.cr-fr-chip.is-picked, .cr-fr-pair .cr-fr-chip.is-picked { background: var(--cr-accent); color: var(--cr-navy); }
.cr-standings tbody tr.cr-st-row:first-child .cr-st-rank-badge { background: var(--cr-card); color: var(--cr-navy); border: 1px solid var(--cr-border); }
.cr-playing-stat-value, .cr-stat-card-value { color: var(--cr-navy); }
.cr-playing-stat-value-none { color: var(--cr-text-light); }

/* =====================================================================
   WARM-UP (Tara, Nov 18 2026) — same bones as the SITE PALETTE above, plus:
   • one warm accent, a muted dusty blush rose, in tiny doses only
     (Upcoming pill, the soft tint behind "needs attention" cards, small
     highlights) — warmth, never a pink site;
   • a deeper court blue (sampled from the court photo's net) for the active
     menu item, tab underlines and links — the page's mid-tone;
   • the page's primary button is gold with navy text (one gold moment);
   • headings and team names in a warm editorial serif (Fraunces), sentence
     case; body text and scores stay in the clean sans;
   • the faded court a little stronger; cards a very soft cream.
   ===================================================================== */
:root {
  --cr-card: #fffcf7;          /* very soft cream cards */
  --cr-court: #78a0b8;         /* deeper court blue, from the photo's net */
  --cr-court-tint: #dcebf5;
  --cr-court-ink: #3f6c8a;     /* same blue, dark enough to read as link text */
  --cr-rose: #c48b8e;          /* muted dusty blush rose */
  --cr-rose-tint: #f8ecea;
  --cr-rose-ink: #8c585c;
  --cr-teal-deep: #3f6c8a;     /* links */
  --cr-serif: "Fraunces", Georgia, "Times New Roman", serif;
}
/* Header and left menu stay crisp white; content cards are cream. */
.cr-header, .cr-sb { background: #fff; }

/* The court reads as a court. */
.cr-has-sb .cr-shell-main::before { opacity: 0.3; }

/* Mid-tone blue: active menu item, tab underlines, links. */
.cr-sb-link.is-on { background: var(--cr-court-tint); color: var(--cr-navy); box-shadow: inset 3px 0 0 var(--cr-court); }
.cr-subtab-active, body.cr-ctx-teams-show .cr-subtab-active { border-bottom-color: var(--cr-court); box-shadow: inset 0 -2px 0 var(--cr-court); }
.cr-home-tab-active, .cr-home-tab-active:hover { box-shadow: inset 0 -2px 0 var(--cr-court), 0 1px 3px rgba(24, 39, 64, 0.08); }
.cr-seg-btn-active, body.cr-ctx-teams-show .cr-seg-btn-active { box-shadow: inset 0 -2px 0 var(--cr-court), 0 1px 2px rgba(10, 22, 40, 0.08); }
.cr-bnav-active::before { background: linear-gradient(90deg, transparent, var(--cr-court), transparent); }
.cr-main a:not([class]), .cr-back-link, .cr-back-link a, .cr-rp-plink, .cr-fr-box-link, .cr-rp-hero-link,
.cr-enter-results-link:not(:hover), .cr-st-team:hover, .cr-ps-playerlink, .cr-app-footer-links a:hover { color: var(--cr-court-ink); }
.cr-rp-hero-link { text-decoration-color: var(--cr-court); }
.cr-dash-cal-full .cr-dash-cal-day-today { border-color: var(--cr-court); }
.cr-dash-cal-full .cr-dash-cal-day-today .cr-dash-cal-day-num { background: var(--cr-court); color: #fff; }
.cr-header-search input:focus { border-color: var(--cr-court); }

/* One gold moment per page: the primary button (Set Lineup, Book a friendly,
   Enter scores, Add Match). Other buttons stay navy or outlined. */
html body .cr-btn.cr-btn-gold, html body .cr-btn-gold, html body .cr-set-lineup-btn, html body .cr-awaiting-badge-link, html body a.cr-btn[href*="edit_results"], html body .cr-btn-pill.cr-btn-primary {
  background: var(--cr-accent); color: var(--cr-navy) !important; border-color: var(--cr-accent); box-shadow: none;
}
html body .cr-btn.cr-btn-gold:hover, html body .cr-set-lineup-btn:hover, html body .cr-awaiting-badge-link:hover { background: #bb9440; color: var(--cr-navy) !important; }

/* Rose, in tiny doses. */
.cr-fr-badge-up { background: var(--cr-rose-tint); color: var(--cr-rose-ink); }
.cr-awaiting-alert, .cr-lineup-confirm-prompt { background: var(--cr-rose-tint) !important; border-color: #ecd3d1 !important; }
.cr-awaiting-alert-icon { color: var(--cr-rose); }
.cr-awaiting-alert-text strong { color: var(--cr-navy); }
.cr-hero-side-label:first-child { color: var(--cr-rose-ink); }
.cr-lookup-tbl .cr-you, .cr-you-tag, .cr-st-you { color: var(--cr-rose-ink) !important; }

/* Headings and team names: warm editorial serif, sentence case. */
html body .cr-page-title, html body .cr-rp-name, html body .cr-auth-title, html body .cr-section-title, html body .cr-card-title, html body .cr-hero-title, html body .cr-team-hero-name, html body .cr-landing-headline, html body .cr-lookup-head h1, html body .cr-fr-title, html body .cr-lu-title, html body .cr-standings-head-title, html body .cr-dt-name, html body .cr-st-team, html body .cr-my-week-team, html body .cr-sb-team-name, html body .cr-hero-side-opp, html body .cr-section-subtitle, html body .cr-fr-box-title, html body .cr-ps-col-card h3, html body .cr-sched-opp, html body .cr-match-opponent {
  font-family: var(--cr-serif); text-transform: none; letter-spacing: -0.01em; font-optical-sizing: auto;
}
html body .cr-page-title, html body .cr-rp-name, html body .cr-auth-title, html body .cr-team-hero-name, html body .cr-landing-headline, html body .cr-hero-title { font-weight: 600; }
html body .cr-section-title, html body .cr-card-title, html body .cr-section-subtitle, html body .cr-fr-box-title { font-weight: 600; font-size: 1.12rem; letter-spacing: 0; }
html body .cr-st-team, html body .cr-my-week-team, html body .cr-sb-team-name, html body .cr-standings-head-title { font-weight: 600; }
html body .cr-sb-team-name { font-size: 0.9rem; }
html body .cr-rp-name { font-size: 2.1rem; line-height: 1.1; }
html body .cr-pp-head-title, html body .cr-pp-name-text { font-family: var(--cr-serif); text-transform: none; letter-spacing: -0.01em; font-weight: 600; color: var(--cr-navy); }

/* =====================================================================
   Rows fill the wide column (Tara, Nov 18 2026): every Upcoming /
   Friendlies row is date | match info | venue | status | ONE real action
   button | calendar + share — no half-empty card. Phones stack it.
   ===================================================================== */
.cr-cu-status, .cr-cu-action { grid-area: auto; min-width: 0; }
.cr-cu-pill {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 0.74rem; font-weight: 700; background: var(--cr-court-tint); color: var(--cr-navy);
}
.cr-cu-pill-muted { background: #eef1f5; color: var(--cr-text-muted); font-weight: 600; }
.cr-cu-pill-you { background: var(--cr-navy); color: #fff; }
.cr-cu-pill-attn, .cr-cu-pill-rose { background: var(--cr-rose-tint); color: var(--cr-rose-ink); }
.cr-cu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 36px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--cr-navy); background: var(--cr-navy); color: #fff !important;
  font-size: 0.84rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.cr-cu-btn:hover { background: var(--cr-black-soft); }
.cr-cu-btn-outline { background: var(--cr-card); color: var(--cr-navy) !important; border-color: var(--cr-border); }
.cr-cu-btn-outline:hover { background: #fff; border-color: var(--cr-navy); }
.cr-cu-btn-gold { background: var(--cr-accent); border-color: var(--cr-accent); color: var(--cr-navy) !important; }
.cr-cu-btn-gold:hover { background: #bb9440; }

@media (min-width: 900px) {
  .cr-cu-phone-only { display: none !important; }
  html body .cr-cu-row {
    grid-template-columns: 52px minmax(0, 1.25fr) minmax(0, 1fr) 128px 132px 76px;
    grid-template-areas: "date info place status action right";
    column-gap: 18px; align-items: center; padding: 12px 18px;
  }
  html body .cr-cu-row > .cr-cu-status { grid-area: status; }
  html body .cr-cu-row > .cr-cu-action { grid-area: action; }
  html body .cr-cu-row > .cr-cu-place:empty::after { content: "Place TBD"; font-size: 0.8rem; font-style: italic; color: var(--cr-text-light); }
  /* Friendlies two-across: info | status / place | action, icons on the right. */
  html body .cr-fr-list .cr-cu-row {
    grid-template-columns: 52px minmax(0, 1fr) 120px 76px;
    grid-template-areas: "date info status right" "date place action right";
    row-gap: 8px;
  }
  html body .cr-fr-list > .cr-cu-row:only-child {
    grid-template-columns: 52px minmax(0, 1.25fr) minmax(0, 1fr) 128px 132px 76px;
    grid-template-areas: "date info place status action right";
  }
}
@media (max-width: 899px) {
  /* Phones: the button sits under the details, full width of that column. */
  html body .cr-cu-row { grid-template-areas: "date info right" "date place right" "date action right"; }
  html body .cr-cu-row > .cr-cu-status { display: none; }
  html body .cr-cu-row > .cr-cu-action { grid-area: action; margin-top: 8px; }
  html body .cr-cu-row > .cr-cu-action .cr-cu-btn { width: auto; min-height: 34px; padding: 0 16px; }
}
/* Friendlies page: the full column, cards two-across on computers. */
@media (min-width: 900px) {
  .cr-fr-index-page .cr-fr-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .cr-fr-index-page .cr-fr-index > .cr-fr-index-row { margin: 0; height: 100%; box-sizing: border-box; }
  .cr-fr-index-page .cr-fr-index > .cr-fr-index-row:only-child { grid-column: 1 / -1; }
}
/* The footer sits right under the content. */
.cr-has-sb .cr-main { padding-bottom: 12px; }
.cr-app-footer { padding-top: 4px; }
.cr-app-footer-inner { padding-top: 14px; }
@media (max-width: 720px) { .cr-has-sb .cr-main { padding-bottom: 8px; } }
.cr-rp-page { padding-bottom: 16px; }
/* Team schedule rows fill the card: date | opponent & time | place | status | action | ▾ */
.cr-sched-row-full { display: grid; grid-template-columns: 50px minmax(0, 1fr) 22px; grid-template-areas: "date main caret" "date place caret" "date action caret"; column-gap: 12px; row-gap: 4px; align-items: center; }
.cr-sched-row-full > .cr-sched-date { grid-area: date; }
.cr-sched-row-full > .cr-sched-main { grid-area: main; }
.cr-sched-row-full > .cr-sched-place { grid-area: place; min-width: 0; font-size: 0.82rem; }
.cr-sched-row-full > .cr-sched-status { display: none; }
.cr-sched-row-full > .cr-sched-action { grid-area: action; margin-top: 4px; }
.cr-sched-row-full > .cr-sched-action .cr-cu-btn { width: auto; min-height: 34px; padding: 0 16px; }
.cr-sched-row-full > .cr-sched-caret { grid-area: caret; justify-self: end; }
.cr-sched-row-full .cr-venue { margin-top: 0; }
.cr-sched-place-text { color: var(--cr-text); font-weight: 600; }
.cr-sched-place-tbd { color: var(--cr-text-light); font-style: italic; }
@media (min-width: 900px) {
  .cr-sched-row-full {
    grid-template-columns: 50px minmax(0, 1.1fr) minmax(0, 1fr) 120px 128px 20px;
    grid-template-areas: "date main place status action caret";
    column-gap: 18px;
  }
  .cr-sched-row-full > .cr-sched-status { display: block; grid-area: status; }
  .cr-sched-row-full > .cr-sched-action { margin-top: 0; }
  .cr-sched-row-full > .cr-sched-action .cr-cu-btn { width: 100%; padding: 0 10px; }
}
.cr-cu-pill.cr-sched-pill, .cr-cu-pill.cr-sched-pill-draft { text-transform: none; letter-spacing: 0; font-size: 0.74rem; padding: 4px 10px; }
.cr-team-page { padding-bottom: 12px; }

/* Court in the margins (Tara, Nov 19 2026): on computers the one court sat
   hidden behind the 920px column and the sides were plain blue. Now a row of
   whole, upright courts runs across the screen (like a row of courts at a
   club), so the margins on both sides read as tennis court. A touch stronger. */
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  .cr-has-sb .cr-shell-main::before {
    background-size: auto 100%;
    background-repeat: repeat-x;
    background-position: center top;
    opacity: 0.38;
  }
}

/* Feature tiles keep their original colourful icons (Tara, Nov 19 2026): the
   six "See your week / Set availability / …" tiles on the sign-in and home
   pages. The ONLY place these colours are allowed; everything else stays navy. */
html body .cr-tone-red    { color: #e5484d !important; background: #fdecec !important; }
html body .cr-tone-green  { color: #2e9d5b !important; background: #e6f6ec !important; }
html body .cr-tone-blue   { color: #3b6fd8 !important; background: #e8effc !important; }
html body .cr-tone-lime   { color: #7a9a14 !important; background: #f2f8dc !important; }
html body .cr-tone-orange { color: #d97706 !important; background: #fdf1e1 !important; }
html body .cr-tone-purple { color: #7c4dce !important; background: #f1ebfb !important; }

/* ================================================================
   FINAL LOCKED PALETTE (Tara, Nov 19 2026) — do not change again.
   Light blue page + tennis-court light green accent (the green surround
   of a blue hard court), in small doses: highlights, the top value,
   section markers. The green is NOT the win colour (wins gold, losses
   grey). All text dark navy, secondary text too; no pale text on pale
   blue, no green text. No pink/blush, no red/yellow, no grid, no navy hero.
   ================================================================ */
:root {
  --cr-court-green: #6CAF7E;
  --cr-court-green-tint: #E4F3E8;
  --cr-court-green-line: #bfe0c8;
  /* The old blush accent now uses the court green. Text on it stays navy. */
  --cr-rose: #6CAF7E;
  --cr-rose-tint: #E4F3E8;
  --cr-rose-ink: #1b2a4a;
  /* Secondary text is dark navy too. */
  --cr-text-muted: #1b2a4a;
  --cr-text-light: #1b2a4a;
}
html body .cr-awaiting-alert, html body .cr-lineup-confirm-prompt { border-color: var(--cr-court-green-line) !important; }
.cr-hero-side-label:first-child, .cr-lookup-tbl .cr-you, .cr-you-tag, .cr-st-you { color: var(--cr-navy) !important; }

/* Your own row (Tara Bucci): court green tint, navy text. */
.cr-me-row, .cr-me-row > td, tr.cr-me-row td,
.cr-standings-tbl-self, .cr-standings-tbl-self > td { background: var(--cr-court-green-tint) !important; color: var(--cr-navy) !important; }
.cr-roster-row.cr-me-row { border-radius: 8px; box-shadow: inset 3px 0 0 var(--cr-court-green); }
tr.cr-me-row td:first-child, tr.cr-standings-tbl-self td:first-child { box-shadow: inset 3px 0 0 var(--cr-court-green); }

/* The top value: rank 1 gets a green ring. */
html body .cr-standings tbody tr.cr-st-row:first-child .cr-st-rank-badge,
html body .cr-home-st tbody tr.cr-st-league + tr.cr-st-row .cr-st-rank-badge {
  background: var(--cr-court-green-tint); border: 1.5px solid var(--cr-court-green); color: var(--cr-navy);
}

/* Section markers: a short green bar before section headings. */
.cr-chart-section-title, .cr-st-league td { color: var(--cr-navy) !important; }
.cr-chart-section-title::before, .cr-ps-col-card h3::before {
  content: ""; display: inline-block; width: 4px; height: 0.95em; margin-right: 8px;
  vertical-align: -0.12em; border-radius: 2px; background: var(--cr-court-green);
}
.cr-st-league td { box-shadow: inset 3px 0 0 var(--cr-court-green); }

/* Bars: solid white track with a visible border, dark navy fill, navy numbers. */
html body .cr-bar-track { background: #fff; border: 1px solid #b9c6d4; }
html body .cr-bar-fill, html body .cr-bar-fill-navy { background: var(--cr-navy); color: #fff; }
html body .cr-bar-fill > span { display: none; }   /* the number sits at the end of the bar, in navy */
html body .cr-bar-fill-empty { background: transparent; }
html body .cr-bar-value { color: var(--cr-navy); font-weight: 700; }
.cr-bar-row { grid-template-columns: 42px 1fr 96px; }
.cr-bar-row:has(.cr-bar-label-wide) { grid-template-columns: minmax(110px, 30%) 1fr 96px; }
@media (max-width: 720px) {
  .cr-bar-row { grid-template-columns: 34px 1fr 84px; }
  .cr-bar-row:has(.cr-bar-label-wide) { grid-template-columns: minmax(90px, 32%) 1fr 84px; }
}

/* Tables, stat tiles and bars sit on solid cards with a visible border. */
html body .cr-playing-stat-card, html body .cr-ps-col-card, html body .cr-chart-summary-card,
html body .cr-chart-section, html body .cr-rp-scroll, html body .cr-standings, html body .cr-home-st {
  background: var(--cr-card); border: 1px solid #cfd9e4;
}
html body .cr-chart-section, html body .cr-ps-col-card { border-radius: 12px; padding: 14px 16px; }

/* The court shows only in the margins: a solid light-blue band sits behind
   the content column on computers, so the court never shows through it. */
@media (min-width: 1000px) {
  .cr-has-sb .cr-shell-main::after {
    content: ""; position: fixed; z-index: -1; pointer-events: none;
    top: var(--cr-hh); bottom: 0; width: calc(var(--cr-col) + 48px);
    left: calc(var(--cr-sb-w) + (100% - var(--cr-sb-w) - var(--cr-col) - 48px) / 2);
    background: var(--cr-page);
  }
  body.cr-ctx-division_teams-show .cr-shell-main::after { display: none; }
}

/* All text navy (Tara, Nov 19 2026): links too (underlined so they still read as links). */
html body .cr-main a:not([class]), html body .cr-back-link, html body .cr-back-link a, html body .cr-rp-plink,
html body .cr-fr-box-link, html body .cr-rp-hero-link, html body .cr-enter-results-link, html body .cr-ps-playerlink,
html body .cr-pp-head-link, html body .cr-archive-row-record, html body .cr-dp-tag, html body .cr-pp-city-edit summary, html body .cr-pp-city-edit > summary,
html body .cr-archive-league-name, html body .cr-archive-count, html body .cr-captain-col-stat,
html body .cr-deltri-record, html body .cr-st-n, html body .cr-roster-rating, html body .cr-roster a,
html body .cr-main [style*="--cr-gold"], html body .cr-main [style*="--cr-text-light"] { color: var(--cr-navy) !important; }
html body .cr-main a:not([class]), html body .cr-rp-hero-link, html body .cr-pp-head-link { text-decoration: underline; text-decoration-color: var(--cr-court-green); text-underline-offset: 3px; }
html body .cr-roster-history-link, html body button.cr-roster-history-link { color: var(--cr-navy) !important; background: #fff; border: 1px solid #cfd9e4; }

/* ================================================================
   DESIGN SYSTEM (Tara, Nov 19 2026) — one system on every page.
   Navy #1B2A4A for ALL text; gold #C9A227 primary buttons with navy text;
   Court Green #6CAF7E the only other accent (tint #E4F3E8 for your own row);
   every card solid cream/white, 1px visible border, same radius + padding.
   ================================================================ */
:root {
  --cr-navy: #1b2a4a; --cr-text: #1b2a4a; --cr-black: #1b2a4a;
  --cr-text-muted: #1b2a4a; --cr-text-light: #1b2a4a; --cr-rose-ink: #1b2a4a;
  --cr-accent: #c9a227; --cr-gold-btn: #c9a227; --cr-gold-btn-hover: #b8931f;
  --cr-card-border: #cfd9e4;
  --cr-card-radius: 14px;
  --cr-card-pad: 16px 18px;
}

/* Header Band match card. */
.cr-band-grid { display: grid !important; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .cr-band-grid { grid-template-columns: 1fr 1fr; } }
.cr-band-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--cr-card); border: 1px solid var(--cr-card-border); border-radius: var(--cr-card-radius);
  overflow: hidden; color: var(--cr-navy);
  transition: box-shadow .15s ease;
}
@media (hover: hover) { .cr-band-card[onclick]:hover { box-shadow: 0 4px 14px rgba(27, 42, 74, 0.10); } }
.cr-band-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--cr-court-green-tint); border-bottom: 1px solid var(--cr-court-green-line);
  padding: 10px 18px; font-size: 0.86rem; font-weight: 700; color: var(--cr-navy);
}
.cr-band-dot { font-weight: 700; }
.cr-band-pill, .cr-band-status {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: #fff; border: 1px solid var(--cr-court-green); color: var(--cr-navy);
}
.cr-band-status { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 0.74rem; border-color: var(--cr-card-border); }
.cr-band-status-you { border-color: var(--cr-court-green); }
.cr-band-body { padding: 14px 18px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.cr-band-league { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cr-navy); }
html body .cr-band-title {
  margin: 2px 0 2px; font-family: var(--cr-serif); font-weight: 600; font-size: 1.12rem; line-height: 1.25;
  color: var(--cr-navy); text-transform: none; letter-spacing: 0; overflow-wrap: anywhere;
}
.cr-band-teams { font-size: 0.84rem; color: var(--cr-navy); }
.cr-band-venue { margin-top: 6px; font-size: 0.84rem; color: var(--cr-navy); }
.cr-band-venue .cr-venue, .cr-band-venue .cr-venue-name, .cr-band-venue .cr-venue-line { color: var(--cr-navy) !important; }
.cr-band-venue-tbd { font-style: italic; }
.cr-band-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--cr-card-border); padding: 12px 18px;
}
html body .cr-band-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 18px;
  border-radius: 10px; background: var(--cr-gold-btn); color: var(--cr-navy) !important;
  font-weight: 800; font-size: 0.88rem; text-decoration: none !important; border: 1px solid var(--cr-gold-btn); white-space: nowrap;
}
html body .cr-band-btn:hover { background: var(--cr-gold-btn-hover); }
.cr-band-actions .cr-my-week-right { display: flex; gap: 8px; margin: 0; flex-direction: row; }
.cr-band-actions .cr-cal-btn { width: 36px; height: 36px; border: 1px solid var(--cr-card-border); background: #fff; color: var(--cr-navy); border-radius: 10px; }
/* The old row grid must not apply to band cards. */
.cr-band-grid > .cr-band-card.cr-cu-row { display: flex !important; grid-template-columns: none !important; padding: 0 !important; }
html body .cr-band-card { align-items: stretch; text-align: left; padding: 0; margin: 0; }
html body .cr-band-card > * { width: 100%; box-sizing: border-box; }
.cr-band-head .cr-band-status { margin-left: auto; }
html body .cr-band-grid { max-width: var(--cr-col); width: 100%; margin-left: auto; margin-right: auto; box-sizing: border-box; }
html body .cr-band-actions .cr-cal-btn, html body .cr-band-actions .cr-share-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; margin: 0;
  border: 1px solid var(--cr-card-border); background: #fff; color: var(--cr-navy); border-radius: 10px; box-sizing: border-box;
}

/* Logo tile (Tara, Nov 19 2026): a tennis court in the site palette (court-blue court, court-green surround,
   white lines) with the same bouncing ball. */
html body .cr-brand-ball {
  background: #6CAF7E url("/assets/logo-court-cd7b3a76.svg") center / cover no-repeat;
  box-shadow: 0 2px 8px rgba(27, 42, 74, 0.22); border: 1px solid rgba(27, 42, 74, 0.12);
}

/* ================================================================
   MOCKUP LOOK (Tara's "C. Header Band" mockup, Nov 19 2026) — the model
   for every page: white cards with a soft 1px border, a green-tint band,
   navy headings, soft slate for secondary lines, pill-shaped gold button,
   plain outline icons.
   ================================================================ */
:root {
  --cr-card: #ffffff;
  --cr-card-border: #dde3ea;
  --cr-slate: #5d6b85;          /* secondary lines (league label, "vs.", address) */
  --cr-text-muted: #5d6b85;
  --cr-text-light: #5d6b85;
}
html body .cr-band-card { background: #fff; border: 1px solid var(--cr-card-border); border-radius: 16px; box-shadow: none; }
html body .cr-band-head {
  justify-content: space-between; flex-wrap: nowrap; gap: 10px;
  background: var(--cr-court-green-tint); border-bottom: 0; padding: 14px 20px;
}
html body .cr-band-when { font-size: 1.02rem; font-weight: 700; color: var(--cr-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .cr-band-pill {
  height: auto; padding: 4px 10px; border: 0; border-radius: 6px; background: #fff;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--cr-navy); flex-shrink: 0;
}
html body .cr-band-body { padding: 16px 20px 16px; gap: 6px; }
html body .cr-band-league { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; color: var(--cr-slate); }
html body .cr-band-title { margin: 0; font-family: var(--cr-serif); font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
html body .cr-band-title-vs { font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 1rem; font-weight: 500; color: var(--cr-slate); }
.cr-band-chip {
  display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--cr-navy); color: var(--cr-gold-btn);
  font-size: 0.82rem; font-weight: 700;
}
.cr-band-note { font-size: 0.84rem; font-weight: 600; color: var(--cr-slate); }
html body .cr-band-venue { margin-top: 4px; }
.cr-band-venue-name { font-size: 0.98rem; font-weight: 700; color: var(--cr-navy); }
.cr-band-venue-addr { font-size: 0.92rem; color: var(--cr-slate); }
html body .cr-band-actions {
  margin-top: 10px; padding: 14px 0 0; border-top: 1px solid var(--cr-card-border);
  display: flex; align-items: center; justify-content: space-between;
}
html body .cr-band-btn {
  min-height: 44px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--cr-gold-btn);
  color: var(--cr-navy) !important; font-size: 0.98rem; font-weight: 700;
}
html body .cr-band-actions .cr-cal-btn, html body .cr-band-actions .cr-share-icon {
  width: 36px; height: 36px; border: 0; background: transparent; color: var(--cr-navy);
}
html body .cr-band-actions .cr-cal-btn svg, html body .cr-band-actions .cr-share-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
@media (max-width: 720px) {
  html body .cr-band-title { font-size: 1.3rem; }
}
html body .cr-band-body { flex: 1 1 auto; }
html body .cr-band-actions { margin-top: auto; }
html body .cr-band-venue + .cr-band-actions, html body .cr-band-note + .cr-band-actions { margin-top: auto; }
html body .cr-band-body > .cr-band-actions { margin-top: auto; padding-top: 14px; }
html body .cr-band-body > :nth-last-child(2) { margin-bottom: 10px; }

/* Logo wordmark in the site's heading font, Fraunces (Tara, Nov 19 2026). */
html body .cr-brand-text {
  font-family: var(--cr-serif); font-weight: 700; font-size: 1.95rem; letter-spacing: 0; text-transform: none; line-height: 1;
}
html body .cr-brand-your {
  font-family: Inter, system-ui, -apple-system, sans-serif; font-weight: 800; font-size: 0.6rem; letter-spacing: 0.32em;
  margin: 0 0 3px 1px; color: var(--cr-slate);
}
@media (max-width: 720px) { html body .cr-brand-text { font-size: 1.3rem; letter-spacing: 0; } }

/* Header Band fixes (Tara, Nov 19 2026, #334): TWO pills on every band (date · time, and status);
   ALL secondary text navy #1B2A4A; only the team / event name in the serif. */
:root { --cr-slate: #1b2a4a; --cr-text-muted: #1b2a4a; --cr-text-light: #1b2a4a; }
html body .cr-band-head { justify-content: space-between; }
html body .cr-band-when {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: #fff;
  border: 1px solid var(--cr-court-green); font-size: 0.92rem; font-weight: 700; color: var(--cr-navy);
}
html body .cr-band-pill {
  padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--cr-court-green);
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cr-navy);
}
html body .cr-band-league, html body .cr-band-title-vs, html body .cr-band-teams, html body .cr-band-note,
html body .cr-band-venue-addr, html body .cr-band-venue-name { color: var(--cr-navy) !important; }
html body .cr-band-title-main { font-family: var(--cr-serif); }
html body .cr-band-title-vs { font-family: Inter, system-ui, -apple-system, sans-serif; font-weight: 500; }
html body .cr-band-teams { font-size: 0.86rem; font-weight: 600; }
html body .cr-band-note { font-weight: 700; }
html body .cr-fr-past-title { margin: 26px 0 12px; }
.cr-fr-past-more { margin: 10px 0 0; font-size: 0.9rem; }
@media (min-width: 900px) { html body .cr-fr-more.cr-fr-more-two { grid-template-columns: 1fr 1fr; } }
html body .cr-fr-past-title { max-width: var(--cr-col); width: 100%; box-sizing: border-box; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; }
@media (max-width: 720px) {
  html body .cr-band-head { padding: 12px 14px; gap: 8px; flex-wrap: wrap; }
  html body .cr-band-when { font-size: 0.82rem; padding: 4px 10px; white-space: nowrap; overflow: visible; text-overflow: clip; }
  html body .cr-band-pill { font-size: 0.66rem; padding: 4px 9px; }
}

/* Logo tile: solid court green with the bouncing ball, no court lines (Tara, Nov 19 2026). */
html body .cr-brand-ball { background: #6CAF7E; }

/* Logo: solid court green with a bouncing yellow tennis ball (drawn, so every phone shows the same ball). */
html body .cr-brand-ball { position: relative; overflow: hidden; background: #6CAF7E; }
html body .cr-brand-ball-inner {
  position: absolute; left: 50%; bottom: 16%; width: 46%; height: 46%; margin-left: -23%;
  background: url("/assets/logo-ball-e1415822.svg") center / contain no-repeat;
  animation: cr-logo-hop 1.1s cubic-bezier(.3, 0, .5, 1) infinite;
}
@keyframes cr-logo-hop {
  0%, 100% { transform: translateY(0) scale(1.08, .9); }
  12% { transform: translateY(-6%) scale(1, 1); }
  50% { transform: translateY(-55%) scale(.96, 1.04); }
  88% { transform: translateY(-6%) scale(1, 1); }
}

/* Card buttons in deep court blue with white letters (Tara picked option C, Nov 19 2026).
   The "You're on 6D" / "You're in" tag goes navy with white letters (no gold on the cards). */
:root { --cr-card-btn: #3F6C8A; --cr-card-btn-hover: #335a74; }
html body .cr-band-btn { background: var(--cr-card-btn) !important; color: #fff !important; border: 0; }
html body .cr-band-btn:hover { background: var(--cr-card-btn-hover) !important; }
html body .cr-band-chip { background: var(--cr-navy); color: #fff !important; }

/* Month on the navy date squares must show (it went navy-on-navy in #330). */
html body .cr-sched-date-mon { color: #fff !important; opacity: .85; }
/* Weekday above the month on the schedule date squares (Tara: "month, and day"). */
html body .cr-sched-date-dow { font-size: 0.58rem; font-weight: 800; letter-spacing: 1px; color: #fff; opacity: .75; line-height: 1.2; }

/* Section A (Tara, Nov 21 2026): split titles — only the team / event name is
   in the serif; "vs Smashers" stays in the body sans (team schedule rows). */
html body .cr-title-main { font-family: var(--cr-serif); }
html body .cr-title-vs { font-family: Inter, system-ui, -apple-system, sans-serif; font-weight: 500; letter-spacing: 0; }

/* Tara's list #19/#31/#75 (Nov 22 2026): "Team colors:" in navy like all other
   secondary text, and every swatch outlined so a white colour still shows. */
html body .cr-team-colors-text, html body .cr-team-colors-label { color: var(--cr-navy) !important; }
html body .cr-team-colors-label { font-weight: 700; }
html body .cr-team-colors .cr-color-dot { box-shadow: 0 0 0 1px var(--cr-navy); }
/* My Teams standings gained a T column (Tara's list #17/#37): T is column 5,
   Win% 6, Last 7, Next 8. Phones show W · L · T (Win% and Next stay hidden, as before). */
@media (min-width: 900px) {
  html body .cr-home-st th:nth-child(5) { width: 44px; }
  html body .cr-home-st th:nth-child(6) { width: 72px; }
}
@media (max-width: 640px) {
  html body .cr-home-st thead th:nth-child(5), html body .cr-home-st tbody td:nth-child(5) { display: table-cell; }
  html body .cr-home-st thead th:nth-child(6), html body .cr-home-st tbody td:nth-child(6) { display: none; }
}
html body .cr-home-st .cr-st-t { font-weight: 700; color: var(--cr-navy); }

/* Match scores, Tara's list #26/#102/#122 (Nov 22 2026): the results area on a
   Court Green tint, every name and score navy, bigger bolder set scores,
   Set 1/2/3 headers, each pair labelled with its team, the line total, and the
   league's line rule in one sentence. */
html body .cr-sheet { background: var(--cr-court-green-tint, #E4F3E8); border: 1px solid var(--cr-court-green-line, #bfe0c8); border-radius: 12px; padding: 12px; }
html body .cr-sheet-rule { margin: 0 0 2px; font-size: 0.85rem; font-weight: 600; color: var(--cr-navy); line-height: 1.4; }
html body .cr-sheet-line { background: #fff; border-color: var(--cr-card-border, #cfd9e4); }
html body .cr-sheet-line-head { background: #fff; color: var(--cr-navy); }
html body .cr-sheet-line-label, html body .cr-sheet-names, html body .cr-sheet-playerlink,
html body .cr-sheet-set, html body .cr-sheet-pair-win .cr-sheet-set, html body .cr-sheet-noname,
html body .cr-sheet-entered, html body .cr-sheet-tr-link { color: var(--cr-navy) !important; }
html body .cr-sheet-playerlink { text-decoration: underline; text-underline-offset: 2px; }
html body .cr-sheet-team { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1px; }
html body .cr-sheet-set { min-width: 46px; font-size: 1.2rem; font-weight: 800; }
html body .cr-sheet-pair-win { background: rgba(108, 175, 126, 0.10); }
html body .cr-sheet-pair-win .cr-sheet-set { font-weight: 900; }
html body .cr-sheet-sethead { padding-top: 6px; padding-bottom: 0; }
html body .cr-sheet-sethead .cr-sheet-set { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
html body .cr-sheet-sethead + .cr-sheet-pair { border-top: none; }
html body .cr-sheet-total { font-size: 0.82rem; font-weight: 700; color: var(--cr-navy); }
html body .cr-sheet-entered { opacity: 1; font-weight: 600; }
@media (max-width: 480px) {
  html body .cr-sheet { padding: 8px; }
  html body .cr-sheet-set { min-width: 34px; font-size: 1.05rem; }
  html body .cr-sheet-line-head { flex-wrap: wrap; }
}

/* Court behind the page (Tara, Nov 22 2026, LOCKED — "option A"): on computers ONE
   big court sits behind the page, centred, so the 920px column rests on the court
   and its sidelines, alleys and the two ends of the net show in the margins on
   both sides. Tara's original court photo (court-tall.jpg), net running ACROSS.
   Sizing: the court lines span 70.5% of the photo's width, so a photo
   (column + 380px) / 0.705 wide puts each sideline ~190px outside the column. */
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  .cr-has-sb .cr-shell-main::before {
    background-image: url("/assets/court-tall-2b70ff53.jpg");
    background-size: calc((var(--cr-col) + 380px) / 0.705) auto;
    background-repeat: no-repeat;
    background-position: center center;
    opacity: 1;   /* full strength (Tara, Nov 23): at 0.55 it all but vanished on her laptop */
    inset-block: var(--cr-hh) 0;   /* the whole area under the header, no pale strips */
  }
  /* One court behind the WHOLE page (Tara, Nov 23: "it still looks like 2 courts"):
     the light-blue band that hid the court behind the column is gone, so the
     middle of the court shows through between the cards. */
  .cr-has-sb .cr-shell-main::after { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   LOCKED PALETTE — teal wins (Tara's final decision, Nov 22 2026).
   Do not revisit. This block wins over every earlier palette block.
     Text      navy  #1B2A4A, all text everywhere (never grey text)
     Buttons   blue  #3F6C8A ("option C", Tara's Nov 19 pick), hover #335A74,
               WHITE text — every primary button, one style, site-wide
     Accent    Court Green #6CAF7E, tint #E4F3E8 (band, small marks, scores area)
               — the accent only, never the win colour
     Wins      teal  #1B6B5A chip, WHITE letter
     Losses    grey  #6B7688 chip, WHITE letter
     Page      pale blue; cards white/cream with a 1px border
     Type      Fraunces headings, clean sans body
   NO GOLD anywhere on the site (#C9A227, #E3C84F and #D9C08A were all tried
   and rejected). Only exceptions, separate assets: the logo ball, the bouncing
   ball (the court photo has no gold).
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --cr-btn-blue: #3F6C8A; --cr-btn-blue-hover: #335A74;
  --cr-win-teal: #1B6B5A; --cr-loss-grey: #6B7688;
  --cr-accent: #3F6C8A; --cr-gold-btn: #3F6C8A; --cr-gold-btn-hover: #335A74;
  --cr-card-btn: #3F6C8A; --cr-card-btn-hover: #335A74;
  --cr-win-bg: #1B6B5A; --cr-loss-bg: #6B7688;
}
/* Every primary button: blue, white text. */
html body .cr-btn-gold, html body .cr-btn.cr-btn-gold, html body .cr-btn-primary, html body .cr-set-lineup-btn,
html body .cr-cu-btn:not(.cr-cu-btn-outline), html body .cr-cu-btn-gold, html body .cr-lu-btn.is-primary,
html body .cr-sb-newbtn, html body .cr-chip-btn-primary, html body .cr-band-btn, html body .cr-sync-btn,
html body .cr-match-scores-btn, html body .cr-awaiting-badge-link, html body form input[type="submit"].cr-btn,
html body .cr-login-card input[type="submit"], html body .cr-auth-card input[type="submit"] {
  background: var(--cr-btn-blue) !important; border-color: var(--cr-btn-blue) !important; color: #fff !important;
  box-shadow: none !important;
}
html body .cr-btn-gold:hover, html body .cr-btn-primary:hover, html body .cr-set-lineup-btn:hover,
html body .cr-cu-btn:not(.cr-cu-btn-outline):hover, html body .cr-lu-btn.is-primary:hover, html body .cr-sb-newbtn:hover,
html body .cr-chip-btn-primary:hover, html body .cr-band-btn:hover, html body .cr-sync-btn:hover,
html body .cr-match-scores-btn:hover, html body form input[type="submit"].cr-btn:hover {
  background: var(--cr-btn-blue-hover) !important; border-color: var(--cr-btn-blue-hover) !important; color: #fff !important;
}
html body .cr-btn-gold *, html body .cr-cu-btn:not(.cr-cu-btn-outline) *, html body .cr-sb-newbtn *, html body .cr-sync-btn * { color: #fff !important; }
/* W chips teal + white, L chips grey + white, everywhere. */
html body .cr-result-badge-win, html body .cr-hero-form-w, html body .cr-rp-form-w, html body .cr-st-last-w,
html body .cr-chart-recent-win, html body .cr-st-dot-w, html body .cr-rp-wl-w, html body .cr-adv-win,
html body .cr-cu-res-w, html body .cr-result-w {
  background: var(--cr-win-teal) !important; border-color: var(--cr-win-teal) !important; color: #fff !important;
}
html body .cr-result-badge-loss, html body .cr-hero-form-l, html body .cr-rp-form-l, html body .cr-st-last-l,
html body .cr-chart-recent-loss, html body .cr-st-dot-l, html body .cr-rp-wl-l, html body .cr-adv-loss,
html body .cr-cu-res-l, html body .cr-result-l {
  background: var(--cr-loss-grey) !important; border-color: var(--cr-loss-grey) !important; color: #fff !important;
}
/* Sign-up page logo tile: solid court green like the header logo (no gold). */
html body .cr-auth-logo { background: #6CAF7E !important; box-shadow: 0 2px 8px rgba(27, 42, 74, 0.18) !important; }

/* ═══════════════════════════════════════════════════════════════════════
   BALL DOODLES (Tara, Nov 23 2026) — SUPERSEDES the court-photo background.
   The court photo behind the pages was too busy to read over. Every signed-in
   page is now plain light blue with thin line-drawn tennis balls and dashed
   bounce trails in court blue (like Instagram's doodle chat backgrounds).
   Drawing: app/assets/images/ball-doodles.svg (one 600px tile, repeated).
   ═══════════════════════════════════════════════════════════════════════ */
.cr-has-sb .cr-shell-main::before {
  background: url("/assets/ball-doodles-7becabc4.svg") 0 0 / 960px 960px repeat !important;
  opacity: 1 !important;
  inset: var(--cr-hh) 0 0 0 !important;
}
.cr-has-sb .cr-shell-main::after { display: none !important; }
@media (min-width: 1000px) {
  .cr-has-sb .cr-shell-main::before { left: var(--cr-sb-w) !important; }   /* keep the left menu plain white */
}
@media (max-width: 720px) {
  .cr-has-sb .cr-shell-main::before { background-image: url("/assets/ball-doodles-sm-9effef6b.svg") !important; background-size: 420px 420px !important; }   /* phones: tighter tile so every page shows balls */
}
/* Every page shows the doodles (Tara, Nov 23): signed-out pages (sign in, sign up,
   reset password) have no sidebar shell, so the layer sits on the body there. */
body:not(.cr-has-sb)::before {
  content: ""; position: fixed; inset: var(--cr-hh) 0 0 0; z-index: -1; pointer-events: none;
  background: url("/assets/ball-doodles-7becabc4.svg") 0 0 / 960px 960px repeat;
}
@media (max-width: 720px) { body:not(.cr-has-sb)::before { background-image: url("/assets/ball-doodles-sm-9effef6b.svg"); background-size: 420px 420px; } }
body.cr-ctx-division_teams-show .cr-shell-main::before { display: block !important; }

/* Postseason banner (Districts / Sectionals / Nationals) = win teal (Tara, Nov 23 2026),
   white trophy and words. The lighter court green was too pale for white text. */
.cr-playoff-banner { background: var(--cr-win-teal, #1B6B5A) !important; border-color: var(--cr-win-teal, #1B6B5A) !important; }
.cr-playoff-banner-title, .cr-playoff-banner-sub, .cr-playoff-trophy, .cr-playoff-trophy svg { color: #fff !important; }
.cr-playoff-banner-sub { opacity: 0.92; }

/* Upcoming week headings (Tara, Nov 23 2026, option B): two cards across, grouped
   under "This week / Next week / Later" so the soonest match is easy to find. */
.cr-band-grid > .cr-week-head {
  grid-column: 1 / -1; margin: 18px 0 0; padding-left: 10px;
  border-left: 4px solid var(--cr-court-green, #6CAF7E);
  font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 700; line-height: 1.3;
  color: #1B2A4A; text-transform: none; letter-spacing: 0;
}
.cr-band-grid > .cr-week-head:first-child { margin-top: 0; }
.cr-week-head-count { font-family: Inter, system-ui, sans-serif; font-size: .8rem; font-weight: 600; margin-left: 6px; color: #1B2A4A; }

/* Ratings → USTA teams: one dropdown to pick a team (Tara, Nov 23 2026). */
.cr-rp-team-pick { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 14px; }
.cr-rp-team-pick-label { font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #1B2A4A; }
.cr-rp-team-select {
  flex: 1 1 auto; max-width: 420px; min-width: 0; padding: 10px 38px 10px 14px; border-radius: 12px;
  border: 1px solid #cfd9e4; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231B2A4A' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; -webkit-appearance: none; font: inherit; font-weight: 600; color: #1B2A4A; cursor: pointer;
}
.cr-rp-team-select:focus { outline: 2px solid #3F6C8A; outline-offset: 1px; }
.cr-rp-team[hidden] { display: none !important; }
section.cr-rp-team .cr-rp-team-head { cursor: default; border-bottom: 1px solid var(--cr-card-border, #dde3ea); }
section.cr-rp-team .cr-rp-team-head::after { content: none; }
section.cr-rp-team .cr-rp-team-head .cr-rp-card-title { font-family: "Fraunces", Georgia, serif; }

/* Profile: "Playing Stats — <team>" says which team the stats are for (Tara, Nov 23 2026). */
.cr-stats-for-team { font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: .7em; color: #1B2A4A; text-transform: none; letter-spacing: 0; }
.cr-stats-empty { background: #fff; border: 1px solid var(--cr-card-border, #dde3ea); border-radius: 14px; padding: 16px 18px; color: #1B2A4A; }

/* ═══════════════════════════════════════════════════════════════════════
   DEEP GREEN — option B "bolder" (Tara, Nov 23 2026: "I love B… change that on
   the whole site"). The win teal #1B6B5A, used for:
     • big banners: team page banner, Ratings banner, Team Standings header
       (white words; the white side cards inside stay white with navy words);
     • "you are here" marks: line under the header, current left-menu item,
       current tab, today on the calendar;
     • section marks: league rows in standings, Upcoming week headings.
   NOT used for buttons (stay blue #3F6C8A) or body text (stays navy), so the
   W chips keep their meaning. Light court green stays on card bands/own-row tints.
   ═══════════════════════════════════════════════════════════════════════ */
:root { --cr-deep-green: #1B6B5A; --cr-deep-green-tint: #E3F0EC; }

/* Big banners */
html body .cr-team-hero, html body .cr-rp-hero { background: var(--cr-deep-green) !important; border-color: var(--cr-deep-green) !important; }
html body .cr-team-hero :where(*:not(.cr-hero-side, .cr-hero-side *, .cr-team-color-dot)),
html body .cr-rp-hero :where(*:not(.cr-rp-hero-side, .cr-rp-hero-side *, .cr-rp-hero-level, .cr-rp-hero-level *)) { color: #fff !important; }
/* The white number box (friendly courts needed, a player's level) keeps navy words on white. */
html body .cr-rp-hero .cr-rp-hero-level, html body .cr-rp-hero .cr-rp-hero-level * { color: #1B2A4A !important; }
html body .cr-team-hero, html body .cr-rp-hero { color: #fff !important; }
html body .cr-standings-head { background: var(--cr-deep-green) !important; border-color: var(--cr-deep-green) !important; }
html body .cr-standings-head, html body .cr-standings-head * { color: #fff !important; }

/* "You are here" */
.cr-header { border-bottom: 3px solid var(--cr-deep-green) !important; }
.cr-sb-link.is-on { background: var(--cr-deep-green-tint) !important; box-shadow: inset 3px 0 0 var(--cr-deep-green) !important; }
.cr-subtab-active, body.cr-ctx-teams-show .cr-subtab-active { border-bottom-color: var(--cr-deep-green) !important; box-shadow: inset 0 -3px 0 var(--cr-deep-green) !important; }
.cr-home-tab-active, .cr-home-tab-active:hover { box-shadow: inset 0 -3px 0 var(--cr-deep-green), 0 1px 3px rgba(24,39,64,.08) !important; }
.cr-seg-btn-active, body.cr-ctx-teams-show .cr-seg-btn-active { box-shadow: inset 0 -3px 0 var(--cr-deep-green), 0 1px 2px rgba(10,22,40,.08) !important; }
.cr-dash-cal-full .cr-dash-cal-day-today { border-color: var(--cr-deep-green) !important; }
.cr-dash-cal-full .cr-dash-cal-day-today .cr-dash-cal-day-num { background: var(--cr-deep-green) !important; color: #fff !important; }

/* Section marks */
.cr-st-league td { box-shadow: inset 4px 0 0 var(--cr-deep-green) !important; }
.cr-band-grid > .cr-week-head { border-left-color: var(--cr-deep-green) !important; }

/* New Team → "Start from a previous team" (Tara, Nov 23 2026). */
.cr-replicate { background: #fff; border: 1px solid var(--cr-card-border, #dde3ea); border-radius: 14px; padding: 16px 18px; margin-bottom: 22px; }
.cr-replicate-title { font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; font-weight: 700; color: #1B2A4A; margin: 0 0 4px; }
.cr-replicate-sub { font-size: .86rem; color: #1B2A4A; margin: 0 0 12px; }
.cr-replicate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cr-replicate-select { flex: 1 1 220px; min-width: 0; padding: 11px 14px; border: 1px solid #cfd9e4; border-radius: 10px; font: inherit; color: #1B2A4A; background: #fff; }
.cr-replicate-btn { flex: 0 0 auto; white-space: nowrap; }
.cr-replicate-note { background: var(--cr-deep-green-tint, #E3F0EC); border-left: 4px solid var(--cr-deep-green, #1B6B5A); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: .9rem; color: #1B2A4A; }
.cr-replicate-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; cursor: pointer; }
html body .cr-replicate-btn, html body .cr-replicate-btn:hover { color: #fff !important; }
@media (max-width: 520px) { .cr-replicate-btn { flex: 1 1 100%; } }
/* Create a Team → League menu (Tara, Nov 23 2026). */
.cr-league-select { width: 100%; padding: 12px 16px; border: 1px solid var(--cr-border); border-radius: 8px; font-size: 1rem; background: #fff; color: #1B2A4A; }
#cr-league-name-field[hidden] { display: none !important; }

/* Friendlies → Archive (Tara, Nov 23 2026). */
.cr-fr-archive-all { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cr-fr-archive-all form { margin: 0; }
.cr-fr-archive-note { font-size: .85rem; color: #1B2A4A; margin: 0; }
.cr-fr-archived { margin-top: 18px; background: #fff; border: 1px solid var(--cr-card-border, #dde3ea); border-radius: 14px; padding: 12px 16px; }
.cr-fr-archived summary { cursor: pointer; font-weight: 700; color: #1B2A4A; }
.cr-fr-archived-list { list-style: none; margin: 10px 0 0; padding: 0; }
.cr-fr-archived-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #e3e9f0; color: #1B2A4A; font-size: .92rem; }
.cr-fr-archived-name a { color: #1B2A4A; font-weight: 600; }
.cr-fr-archived-form { margin: 0; flex: 0 0 auto; }

/* Past friendlies → one "Look back" menu by date (Tara, Nov 23 2026). */
.cr-fr-lookback-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--cr-card-border, #dde3ea); border-radius: 14px; padding: 12px 16px; }
.cr-fr-lookback-label { font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #1B2A4A; flex: 0 0 auto; }
.cr-fr-lookback-select { flex: 1 1 auto; min-width: 0; max-width: 520px; padding: 10px 38px 10px 14px; border: 1px solid #cfd9e4; border-radius: 12px; font: inherit; font-weight: 600; color: #1B2A4A; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231B2A4A' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; text-overflow: ellipsis; }
.cr-fr-lookback-cards { margin-top: 14px; max-width: 452px; }
.cr-fr-lookback-card[hidden] { display: none !important; }
@media (max-width: 520px) { .cr-fr-lookback-row { flex-wrap: wrap; } .cr-fr-lookback-select { flex-basis: 100%; } .cr-fr-lookback-cards { max-width: none; } }

/* Friendly scores, no sign-in (Tara, Nov 23 2026). */
.cr-fr-score-rows { list-style: none; margin: 0 0 14px; padding: 0; }
.cr-fr-score-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 120px auto; gap: 6px 14px; align-items: center; padding: 12px 0; border-top: 1px solid #e3e9f0; color: #1B2A4A; }
.cr-fr-score-row:first-child { border-top: 0; }
.cr-fr-score-court { font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.cr-fr-score-pairs { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cr-fr-score-vs { font-weight: 500; }
.cr-fr-score-sets { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cr-fr-score-by { grid-column: 2 / 4; font-size: .82rem; }
.cr-fr-score-remove { grid-column: 4; grid-row: 1; margin: 0; }
.cr-fr-score-log summary { cursor: pointer; text-decoration: underline; display: inline; }
.cr-fr-score-log ul { margin: 6px 0 0; padding-left: 18px; }
.cr-fr-score-add > summary { list-style: none; display: inline-block; cursor: pointer; }
.cr-fr-score-add > summary::-webkit-details-marker { display: none; }
.cr-fr-score-add[open] > summary { margin-bottom: 14px; }
.cr-fr-score-entry { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; max-width: 680px; }
.cr-fr-se-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .85rem; color: #1B2A4A; min-width: 0; }
.cr-fr-se-field input, .cr-fr-se-field select { padding: 10px 12px; border: 1px solid #cfd9e4; border-radius: 10px; font: inherit; font-weight: 500; background: #fff; color: #1B2A4A; min-width: 0; }
.cr-fr-se-sets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.cr-fr-se-set { display: flex; align-items: center; gap: 6px; }
.cr-fr-se-set-label { font-weight: 700; font-size: .85rem; color: #1B2A4A; min-width: 44px; }
.cr-fr-se-set input { width: 58px; padding: 10px 6px; text-align: center; border: 1px solid #cfd9e4; border-radius: 10px; font: inherit; font-weight: 700; color: #1B2A4A; }
.cr-fr-score-entry .cr-fr-score-hint, .cr-fr-score-entry .cr-fr-se-field:last-of-type { grid-column: 1 / -1; }
.cr-fr-score-entry .cr-fr-se-field:last-of-type { max-width: 320px; }
.cr-fr-score-entry .cr-fr-score-hint { margin: 0; font-size: .85rem; color: #1B2A4A; }
.cr-fr-score-entry input[type=submit] { justify-self: start; }
.cr-fr-score-lock { margin-top: 14px; }
@media (max-width: 600px) {
  .cr-fr-score-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cr-fr-score-court { grid-column: 1; }
  .cr-fr-score-remove { grid-column: 2; grid-row: 1; }
  .cr-fr-score-pairs { grid-column: 1; }
  .cr-fr-score-sets { grid-column: 2; grid-row: 2; }
  .cr-fr-score-by { grid-column: 1 / -1; }
  .cr-fr-score-entry { grid-template-columns: minmax(0, 1fr); }
  .cr-fr-se-sets { flex-direction: column; }
}
/* Friendly scores: inner padding like the other cards; scores right after the names (no hollow gap). */
html body .cr-fr-scores { padding-bottom: 20px; margin-bottom: 16px; }
.cr-fr-scores .cr-fr-score-rows, .cr-fr-scores .cr-fr-score-add, .cr-fr-scores > form, .cr-fr-scores > .cr-fr-courts-summary { margin-left: 24px; margin-right: 24px; }
.cr-fr-score-row { grid-template-columns: 84px minmax(0, 260px) minmax(0, 1fr) 96px; }
.cr-fr-score-remove { justify-self: end; }
.cr-fr-scores > form .cr-fr-score-lock { margin-top: 12px; }
@media (max-width: 600px) {
  .cr-fr-scores .cr-fr-score-rows, .cr-fr-scores .cr-fr-score-add, .cr-fr-scores > form, .cr-fr-scores > .cr-fr-courts-summary { margin-left: 16px; margin-right: 16px; }
  .cr-fr-score-row { grid-template-columns: minmax(0, 1fr) auto; }
}
.cr-fr-se-set-label { width: 8.2em; flex: 0 0 auto; }

/* iPhone date boxes: Safari/Chrome on iOS give <input type=date> a built-in
   minimum width and centred text, so it ran past the card's right edge (Tara,
   Nov 23 2026, Edit friendly). Same width as the other boxes, text on the left. */
input[type="date"], input[type="datetime-local"], input[type="time"] {
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
  max-width: 100%; min-width: 0; text-align: left;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
/* Round robin / friendly type hint under the Type menu (Tara, Nov 24 2026). */
html body .cr-fr-form .cr-fr-kind-hint { font-weight: 500; font-size: .8rem; color: #1B2A4A; line-height: 1.4; }



/* Singles/doubles menu hides for round robins (Tara, Nov 24 2026). */
html body .cr-fr-form .cr-fr-format[hidden] { display: none; }

/* Sync scores: spinner shown the moment the button is tapped (QA qa-167). Same blue button, just disabled. */
.cr-sync-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.45);
  border-top-color: #fff; border-radius: 50%; animation: cr-sync-spin 0.8s linear infinite; }
@keyframes cr-sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cr-sync-spin { animation-duration: 2.4s; } }

/* Create a Team: plain Cancel link under the full-width button (QA qa-168). Navy text, underlined, not a button. */
.cr-form-cancel { margin: 14px 0 0; text-align: center; font-size: 0.95rem; }
html body .cr-form-cancel a { color: #1B2A4A; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; padding: 6px 10px; }

/* Team colors legend: swatch + name only (QA qa-170). */
.cr-color-item { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; white-space: nowrap; }
.cr-color-item .cr-color-dot { margin: 0; }

/* Captain tab tables on phones: slimmer number columns so the added Profile column
   fits without a sideways swipe (Profile column, Nov 25 2026). */
@media (max-width: 480px) {
  html body .cr-captain-analytics-header, html body .cr-captain-analytics-row { padding-left: 10px; padding-right: 10px; }
  html body .cr-captain-col-name { flex: 1 0 92px; min-width: 92px; }
  html body .cr-captain-col-stat { width: 42px; }
  html body .cr-captain-analytics-header { font-size: 0.6rem; letter-spacing: 0; }
  html body .cr-captain-analytics-header .cr-captain-col-stat { overflow: hidden; text-overflow: clip; }
}
