/* Clubs page (Explore / Near Me / My Clubs / Invites) and Create Club.
   The Create Club dialog reuses the Edit Profile form styles in profile.css. */

.clubs-page {
  --clubs-navy: #0b2a66;
  --clubs-ink: #13244a;
  --clubs-muted: #5b6b86;
  --clubs-blue: #1c7cf4;
  --clubs-blue-soft: #e7f1ff;
  --clubs-line: #dfe7f3;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 0 calc(110px + env(safe-area-inset-bottom));
  background: #eef3fa;
  color: var(--clubs-ink);
}

.clubs-hero {
  display: grid;
  gap: 14px;
  padding: 18px 16px 16px;
  border-radius: 0 0 26px 26px;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(56, 150, 255, 0.45), transparent 60%),
    linear-gradient(160deg, #0a3b8c 0%, #0b56c9 55%, #2f86f0 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(11, 42, 102, 0.22);
}

.clubs-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.clubs-hero h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.clubs-hero-top p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

/* Same button and placement as Edit Profile on the player hero. */
.clubs-create-button {
  margin-top: 4px;
  gap: 6px;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.96);
  color: var(--clubs-navy);
  box-shadow: 0 4px 12px rgba(4, 30, 80, 0.18);
}

.clubs-create-button[data-locked="true"] {
  opacity: 0.82;
}

.clubs-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--clubs-ink);
  box-shadow: 0 6px 16px rgba(4, 30, 80, 0.16);
}

.clubs-search svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.clubs-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
}

.clubs-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.clubs-tab {
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.clubs-tab.is-active {
  background: linear-gradient(180deg, #4fb2ff 0%, #1f7ff3 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 6px 18px rgba(79, 178, 255, 0.55);
}

.clubs-filters {
  display: grid;
  gap: 12px;
  padding: 14px 16px 4px;
}

.clubs-sport-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.clubs-sport-chips::-webkit-scrollbar {
  display: none;
}

.clubs-sport-chip,
.clubs-select {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--clubs-line);
  border-radius: 14px;
  background: #fff;
  color: var(--clubs-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(11, 42, 102, 0.06);
}

.clubs-sport-chip {
  cursor: pointer;
}

.clubs-sport-chip.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #2a8bff 0%, #1467e6 100%);
  color: #fff;
}

.clubs-sport-chip svg,
.clubs-select svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clubs-selects {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.clubs-select select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.clubs-select select:disabled {
  opacity: 0.5;
  cursor: default;
}

.clubs-results {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
}

.club-card {
  border: 1px solid var(--clubs-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11, 42, 102, 0.07);
}

.club-card-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.club-card-avatar {
  display: grid;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(160deg, #0a3b8c, #1c7cf4);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.club-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-card-body {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.club-card-body h2 {
  margin: 0 0 2px;
  overflow: hidden;
  color: var(--clubs-navy);
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--clubs-muted);
  font-size: 13px;
}

.club-card-meta svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--clubs-blue);
  stroke-width: 2;
}

.club-card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-card-role {
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff4dc;
  color: #8a5a00;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.club-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.club-card-tags li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--clubs-blue-soft);
  color: #1d5fc4;
  font-size: 12px;
  font-weight: 600;
}

.club-card-chevron {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--clubs-blue-soft);
  color: var(--clubs-navy);
}

.club-card-chevron svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.club-invite-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px;
  color: var(--clubs-muted);
  font-size: 13px;
}

.club-invite-actions span {
  flex: 1;
}

.club-invite-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--clubs-line);
  border-radius: 12px;
  background: #fff;
  color: var(--clubs-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.club-invite-actions button.is-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #2a8bff, #1467e6);
  color: #fff;
}

.clubs-empty {
  padding: 28px 18px;
  border: 1px dashed #c6d4ea;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.clubs-empty h2 {
  margin: 0 0 6px;
  color: var(--clubs-navy);
  font-size: 17px;
}

.clubs-empty p {
  margin: 0;
  color: var(--clubs-muted);
  font-size: 14px;
}

/* Create Club dialog: Edit Profile form plus a sports picker. */
.club-create-sports {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Matches the Edit Profile field labels (profile.css forces grid slots on
   .profile-edit-field with !important, so the picker keeps its own class). */
.club-create-sports legend {
  margin-bottom: 6px;
  padding: 0;
  color: rgb(185, 208, 234);
  font-size: 12px;
  font-weight: 700;
}

.club-create-sports legend b {
  color: rgb(238, 83, 94);
}

.club-create-sports > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.club-create-sport {
  position: relative;
}

.club-create-sport input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.club-create-sport span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #c9d8ee;
  border-radius: 12px;
  background: #fff;
  color: #13244a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.club-create-sport svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.club-create-sport input:checked + span {
  border-color: transparent;
  background: linear-gradient(180deg, #2a8bff, #1467e6);
  color: #fff;
}

.club-create-sport input:focus-visible + span {
  outline: 2px solid #1c7cf4;
  outline-offset: 2px;
}

.club-create-dialog .profile-edit-photo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-locked-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2a8bff, #1467e6);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 380px) {
  .clubs-tab {
    font-size: 12.5px;
  }

  .club-card-avatar {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }
}

/* Club page (/clubs/:id). Reuses the profile hero, tabs and cards from
   profile.css; these rules add the club-specific pieces. */
.club-page-loading {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.club-page-loading span {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e6edf7, #f4f7fc, #e6edf7);
  background-size: 200% 100%;
  animation: club-shimmer 1.2s linear infinite;
}

.club-page-loading span:first-child { height: 96px; }

@keyframes club-shimmer {
  to { background-position: -200% 0; }
}

.club-hero .identity-block {
  position: relative;
}

.club-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-hero .club-edit-button {
  position: absolute;
  top: -2px;
  right: -2px;
  border: 1px solid #cfdcf0;
  background: #fff;
  color: #0b2a66;
  box-shadow: 0 2px 8px rgba(11, 42, 102, 0.1);
}

.club-hero-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 6px;
  color: #5b6b86;
  font-size: 13px;
}

.club-hero-location svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #1c7cf4;
  stroke-width: 2;
}

.club-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.club-hero-chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: #e7f1ff;
  color: #1d5fc4;
  font-size: 12px;
  font-weight: 700;
}

.club-hero-chip.is-role {
  background: #fff4dc;
  color: #8a5a00;
}

.club-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.club-action {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #dfe7f3;
  border-radius: 13px;
  background: #fff;
  color: #13244a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 42, 102, 0.06);
}

.club-action svg,
.club-see-all svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.club-action.is-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #2a8bff, #1467e6);
  color: #fff;
}

.club-action.is-quiet {
  flex: 0 0 auto;
  color: #5b6b86;
}

.club-actions-note {
  flex-basis: 100%;
  margin: 0;
  color: #5b6b86;
  font-size: 13px;
}

.club-sponsor {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(11, 42, 102, 0.12);
}

.club-sponsor img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
}

.club-page-view {
  margin-top: 12px;
}

.club-page-message:empty {
  display: none;
}

.club-page-message {
  position: fixed;
  left: 50%;
  bottom: calc(110px + env(safe-area-inset-bottom));
  z-index: 30;
  max-width: min(92vw, 420px);
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: #0b2a66;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: 0 10px 24px rgba(4, 30, 80, 0.3);
}

.club-about-bio {
  margin: 0 0 12px;
  color: #13244a;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
}

.club-about-bio.is-empty {
  color: #5b6b86;
  font-style: italic;
}

.club-about-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.club-about-facts div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  font-size: 13px;
}

.club-about-facts dt {
  color: #5b6b86;
  font-weight: 700;
}

.club-about-facts dd {
  margin: 0;
  color: #13244a;
}

.club-about-facts a {
  color: #1467e6;
  font-weight: 700;
}

.club-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.club-member-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.club-verified {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  place-items: center;
  border-radius: 50%;
  background: #1fa45a;
  vertical-align: -2px;
}

.club-verified svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
}

.club-you {
  color: #5b6b86;
  font-weight: 600;
}

.club-member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.club-badge {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.club-badge.is-admin { background: #fff4dc; color: #8a5a00; }
.club-badge.is-moderator { background: #e7f1ff; color: #1d5fc4; }
.club-badge.is-founder { background: #efe9ff; color: #5b3cc4; }

.club-member-manage {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dfe7f3;
  border-radius: 12px;
  background: #fff;
  color: #13244a;
  cursor: pointer;
}

.club-member-manage svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.club-see-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid #dfe7f3;
  border-radius: 12px;
  background: #f5f8fd;
  color: #1467e6;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.club-event-group {
  margin: 12px 0 4px;
  color: #5b6b86;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.club-event-row {
  color: inherit;
  text-decoration: none;
}

.club-event-kind {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 8px;
  background: #e7f1ff;
  color: #1d5fc4;
  font-size: 11px;
  font-weight: 800;
}

.club-event-kind.is-tournament { background: #efe9ff; color: #5b3cc4; }
.club-event-kind.is-event { background: #e9f7ef; color: #1b7a44; }
.club-event-kind.is-live { background: #e5383b; color: #fff; }

/* Member and invite sheets. */
.club-sheet {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.club-sheet-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.club-sheet-heading > div {
  flex: 1;
  min-width: 0;
}

.club-sheet-heading h2 {
  margin: 0;
  font-size: 19px;
}

.club-sheet-heading p {
  margin: 3px 0 0;
  color: rgb(185, 208, 234);
  font-size: 13px;
}

.club-role-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.club-role-options legend {
  margin-bottom: 6px;
  color: rgb(185, 208, 234);
  font-size: 12px;
  font-weight: 700;
}

.club-role-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(55, 169, 255, 0.35);
  border-radius: 12px;
  cursor: pointer;
}

.club-role-option input {
  margin-top: 3px;
  accent-color: #1c7cf4;
}

.club-role-option span {
  display: grid;
  gap: 2px;
}

.club-role-option small {
  color: rgb(185, 208, 234);
  font-size: 12px;
}

.club-role-option:has(input:checked) {
  border-color: #37a9ff;
  background: rgba(55, 169, 255, 0.14);
}

.club-sheet-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.club-primary,
.club-danger {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.club-primary {
  border: 0;
  background: linear-gradient(180deg, #2a8bff, #1467e6);
  color: #fff;
}

.club-primary.is-done {
  background: #1fa45a;
}

.club-danger {
  border: 1px solid rgba(238, 83, 94, 0.6);
  background: transparent;
  color: #ff7d86;
}

.club-invite-search {
  box-shadow: none;
}

.club-invite-results {
  max-height: 50vh;
  margin: 0;
  overflow-y: auto;
}

.club-invite-send {
  min-height: 36px;
  padding: 0 14px;
}

.club-invite-empty {
  padding: 12px 4px;
  color: rgb(185, 208, 234);
  font-size: 13px;
  list-style: none;
}

.club-edit-sponsor .club-edit-banner {
  display: grid;
  gap: 8px;
}

.club-edit-banner-preview {
  display: grid;
  min-height: 90px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px dashed rgba(55, 169, 255, 0.6);
  border-radius: 12px;
  background: rgba(4, 34, 71, 0.4);
  color: rgb(185, 208, 234);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.club-edit-banner-preview span {
  padding: 12px;
}

.club-edit-banner-preview img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}

.club-edit-sponsor-link {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(55, 169, 255, 0.4);
  border-radius: 12px;
  background: #fff;
  color: #13244a;
  font: inherit;
}


/* Keep the club name clear of Edit Club: the eyebrow row matches its height. */
.club-hero:has(.club-edit-button) .identity-copy .eyebrow {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 0;
  padding-right: 112px;
}

/* ==========================================================================
   COURTCAST CLUB LIST — REFERENCE DENSITY PASS 2026-09-24

   Mobile-only visual refinement for /clubs.
   Keeps application-shell header/navigation geometry untouched.
   ========================================================================== */

@media (max-width: 759px) {

  /* -----------------------------------------------------------------------
     PAGE
     ----------------------------------------------------------------------- */

  .clubs-page {
    --clubs-navy: #092765;
    --clubs-ink: #10265f;
    --clubs-muted: #5870a2;
    --clubs-blue: #087df5;
    --clubs-blue-soft: #e9f3ff;
    --clubs-line: #dbe8f6;

    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: calc(106px + env(safe-area-inset-bottom));

    background:
      radial-gradient(
        circle at 18% 18%,
        rgba(108, 198, 255, 0.12),
        transparent 30%
      ),
      linear-gradient(
        180deg,
        #f5fbff 0%,
        #eef6fd 55%,
        #f6fbff 100%
      );
  }


  /* -----------------------------------------------------------------------
     HERO
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-hero {
    gap: 9px;

    padding:
      11px
      max(15px, env(safe-area-inset-right))
      11px
      max(15px, env(safe-area-inset-left));

    border-radius: 0 0 23px 23px;

    background:
      radial-gradient(
        95% 125% at 89% -8%,
        rgba(36, 164, 255, 0.60),
        transparent 60%
      ),
      radial-gradient(
        70% 100% at 4% 100%,
        rgba(24, 118, 240, 0.42),
        transparent 70%
      ),
      linear-gradient(
        145deg,
        #073a83 0%,
        #075bbd 52%,
        #2188ee 100%
      );

    box-shadow:
      0 10px 26px rgba(4, 50, 112, 0.17),
      inset 0 -1px 0 rgba(255, 255, 255, 0.13);
  }

  .clubs-page .clubs-hero-top {
    min-height: 48px;
    align-items: center;
    gap: 8px;
  }

  .clubs-page .clubs-hero h1 {
    margin: 0;

    font-size: 31px;
    font-weight: 820;
    line-height: 0.98;
    letter-spacing: -0.035em;
  }

  .clubs-page .clubs-hero-top p {
    margin-top: 4px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 13px;
    line-height: 1.2;
  }


  /* -----------------------------------------------------------------------
     CREATE CLUB

     Keep the function, but remove the oversized secondary CTA.
     It becomes a compact + action beside the Clubs title.
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-create-button {
    display: grid;

    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;

    margin: 0;
    padding: 0;

    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 50%;

    background:
      linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98),
        rgba(229, 245, 255, 0.92)
      );

    color: #0759bd;

    box-shadow:
      0 5px 13px rgba(0, 39, 97, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  .clubs-page .clubs-create-button > span:last-child {
    display: none;
  }

  .clubs-page .clubs-create-button .profile-edit-icon {
    display: block;

    width: auto;
    height: auto;

    margin: 0;

    font-size: 23px;
    font-weight: 400;
    line-height: 1;
  }


  /* -----------------------------------------------------------------------
     SEARCH
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-search {
    min-height: 44px;

    gap: 9px;

    padding-inline: 14px;

    border: 1px solid rgba(210, 229, 247, 0.72);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.97);

    box-shadow:
      0 5px 14px rgba(5, 48, 104, 0.11),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  .clubs-page .clubs-search svg {
    width: 20px;
    height: 20px;
    flex-basis: 20px;

    stroke-width: 2.15;
  }

  .clubs-page .clubs-search input {
    font-size: 14px;
    line-height: 1;
  }

  .clubs-page .clubs-search input::placeholder {
    color: #8295ba;
    opacity: 1;
  }


  /* -----------------------------------------------------------------------
     EXPLORE / NEAR ME / MY CLUBS / INVITES
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-tabs {
    gap: 2px;

    padding: 3px;

    border:
      1px solid rgba(188, 226, 255, 0.54);

    border-radius: 13px;

    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.18),
        rgba(159, 210, 255, 0.12)
      );

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .clubs-page .clubs-tab {
    min-height: 36px;

    padding-inline: 4px;

    border-radius: 10px;

    font-size: 12.5px;
    font-weight: 650;
  }

  .clubs-page .clubs-tab.is-active {
    border: 1px solid rgba(121, 238, 255, 0.92);

    background:
      radial-gradient(
        circle at 50% 115%,
        rgba(0, 239, 255, 0.52),
        transparent 56%
      ),
      linear-gradient(
        180deg,
        #1c9eff 0%,
        #087bf3 100%
      );

    color: #ffffff;

    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.22),
      0 0 16px rgba(0, 220, 255, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.38);
  }


  /* -----------------------------------------------------------------------
     FILTER AREA
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-filters {
    gap: 8px;

    padding:
      9px
      max(15px, env(safe-area-inset-right))
      2px
      max(15px, env(safe-area-inset-left));
  }

  .clubs-page .clubs-sport-chips {
    gap: 6px;

    margin: 0;

    overscroll-behavior-inline: contain;
  }

  .clubs-page .clubs-sport-chip {
    min-height: 34px;

    gap: 6px;

    padding-inline: 10px;

    border-radius: 13px;

    font-size: 12.5px;
    font-weight: 650;

    box-shadow:
      0 2px 5px rgba(18, 66, 125, 0.045);
  }

  .clubs-page .clubs-sport-chip.is-active {
    background:
      radial-gradient(
        circle at 80% 110%,
        rgba(0, 235, 255, 0.56),
        transparent 50%
      ),
      linear-gradient(
        145deg,
        #1087ff 0%,
        #0672ed 100%
      );

    box-shadow:
      0 5px 13px rgba(5, 116, 238, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.30);
  }

  .clubs-page .clubs-sport-chip svg {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }


  /* -----------------------------------------------------------------------
     LOCATION + SORT
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-selects {
    gap: 8px;
  }

  .clubs-page .clubs-select {
    min-height: 36px;

    gap: 6px;

    padding-inline: 11px;

    border-radius: 13px;

    font-size: 12.5px;
    font-weight: 650;

    box-shadow:
      0 2px 5px rgba(18, 66, 125, 0.045);
  }

  .clubs-page .clubs-select svg {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .clubs-page .clubs-select:first-child {
    max-width: 44%;
  }

  .clubs-page .clubs-select:last-child {
    max-width: 54%;
  }

  .clubs-page .clubs-select select {
    max-width: 100%;

    font-size: 12.5px;
    font-weight: 650;
  }


  /* -----------------------------------------------------------------------
     RESULTS
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-results {
    gap: 8px;

    padding:
      9px
      max(15px, env(safe-area-inset-right))
      14px
      max(15px, env(safe-area-inset-left));
  }


  /* -----------------------------------------------------------------------
     CLUB CARD
     ----------------------------------------------------------------------- */

  .clubs-page .club-card {
    overflow: hidden;

    border:
      1px solid rgba(215, 230, 245, 0.92);

    border-radius: 15px;

    background:
      linear-gradient(
        100deg,
        rgba(255, 255, 255, 0.985) 0%,
        rgba(250, 253, 255, 0.98) 100%
      );

    box-shadow:
      0 5px 14px rgba(17, 65, 118, 0.055),
      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  }

  .clubs-page .club-card-link {
    min-height: 78px;

    gap: 10px;

    padding: 7px 9px;
  }


  /* -----------------------------------------------------------------------
     CLUB LOGO
     ----------------------------------------------------------------------- */

  .clubs-page .club-card-avatar {
    width: 64px;
    height: 64px;
    flex-basis: 64px;

    border:
      1px solid rgba(224, 235, 247, 0.92);

    border-radius: 12px;

    background: #ffffff;

    color: #075fca;

    font-size: 18px;

    box-shadow:
      0 3px 10px rgba(22, 65, 109, 0.045);
  }

  .clubs-page .club-card-avatar img {
    width: 100%;
    height: 100%;

    box-sizing: border-box;

    padding: 3px;

    object-fit: contain;

    background: #ffffff;
  }


  /* -----------------------------------------------------------------------
     CLUB BODY
     ----------------------------------------------------------------------- */

  .clubs-page .club-card-body {
    gap: 1px;
  }

  .clubs-page .club-card-body h2 {
    margin: 0 0 1px;

    color: #08256a;

    font-size: 16px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.018em;
  }

  .clubs-page .club-card-meta {
    gap: 5px;

    min-height: 15px;

    color: #6175a2;

    font-size: 12px;
    line-height: 1.14;
  }

  .clubs-page .club-card-meta svg {
    width: 14px;
    height: 14px;
    flex-basis: 14px;

    stroke: #2863ad;
    stroke-width: 2.05;
  }

  .clubs-page .club-card-role {
    margin-left: 3px;

    padding: 1px 7px;

    font-size: 10px;
    line-height: 1.35;
  }


  /* -----------------------------------------------------------------------
     CLUB TAGS
     ----------------------------------------------------------------------- */

  .clubs-page .club-card-tags {
    gap: 5px;

    margin-top: 3px;

    flex-wrap: nowrap;

    overflow: hidden;
  }

  .clubs-page .club-card-tags li {
    flex: 0 0 auto;

    padding: 2px 9px;

    border-radius: 999px;

    background:
      linear-gradient(
        180deg,
        #edf6ff,
        #e5f1ff
      );

    color: #165bb8;

    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.35;

    white-space: nowrap;
  }


  /* -----------------------------------------------------------------------
     CHEVRON
     ----------------------------------------------------------------------- */

  .clubs-page .club-card-chevron {
    width: 31px;
    height: 31px;
    flex-basis: 31px;

    border-radius: 50%;

    background:
      linear-gradient(
        145deg,
        #f1f6ff,
        #e6effc
      );

    color: #092b75;
  }

  .clubs-page .club-card-chevron svg {
    width: 16px;
    height: 16px;

    stroke-width: 2.5;
  }


  /* -----------------------------------------------------------------------
     INVITES
     ----------------------------------------------------------------------- */

  .clubs-page .club-invite-actions {
    gap: 6px;

    padding:
      0
      9px
      8px;

    font-size: 11.5px;
  }

  .clubs-page .club-invite-actions button {
    min-height: 32px;

    padding-inline: 12px;

    border-radius: 10px;

    font-size: 11px;
  }


  /* -----------------------------------------------------------------------
     EMPTY STATE
     ----------------------------------------------------------------------- */

  .clubs-page .clubs-empty {
    padding: 22px 15px;

    border-radius: 15px;
  }

  .clubs-page .clubs-empty h2 {
    margin-bottom: 4px;

    font-size: 16px;
  }

  .clubs-page .clubs-empty p {
    font-size: 12.5px;
  }
}


/* Extra tightening for narrow iPhone / Android widths. */

@media (max-width: 390px) {

  .clubs-page .clubs-hero {
    padding-inline:
      max(12px, env(safe-area-inset-left))
      max(12px, env(safe-area-inset-right));
  }

  .clubs-page .clubs-filters,
  .clubs-page .clubs-results {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .clubs-page .clubs-sport-chip {
    padding-inline: 9px;

    font-size: 12px;
  }

  .clubs-page .club-card-link {
    gap: 8px;

    padding-inline: 8px;
  }

  .clubs-page .club-card-avatar {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .clubs-page .club-card-body h2 {
    font-size: 15px;
  }

  .clubs-page .club-card-meta {
    font-size: 11.5px;
  }

  .clubs-page .club-card-tags li {
    padding-inline: 8px;

    font-size: 10px;
  }

  .clubs-page .club-card-chevron {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }
}

/* ==========================================================================
   CLUB PAGE HEADER — like the reference: logo at the top-left, the name,
   location and member count beside it, Edit Club at the top-right, then
   Invite Player(s) · Create Open Play · Share in one row. (The member icon
   had no size, which stretched the header with empty space.)
   ========================================================================== */
.club-hero .identity-block {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.club-hero .club-hero-avatar {
  width: 104px;
  height: 104px;
  align-self: start;
  border-radius: 20px;
  overflow: hidden;
}
.club-hero .identity-copy { min-width: 0; }
.club-hero .identity-copy .eyebrow { display: none !important; }
.club-hero .identity-copy h1 {
  margin: 2px 0 6px;
  font-size: clamp(20px, 5.4vw, 28px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.club-hero:has(.club-edit-button) .identity-copy h1 { padding-right: 104px; }
.club-hero .club-hero-location { margin: 0 0 4px; }
.club-hero-members {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 8px;
  color: #5b6b86;
  font-size: 13px;
}
.club-hero-members svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #1c7cf4;
  stroke-width: 2;
}
.club-hero .identity-subtitle { margin: 6px 0 0; color: #5b6b86; font-size: 12px; }
.club-hero .club-edit-button { top: 0; right: 0; min-height: 34px; padding: 6px 10px; }

.club-hero .club-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.club-hero .club-action { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 0 10px; white-space: nowrap; }
.club-hero .club-action[data-club-share] { flex: 0 0 48px; padding: 0; }
.club-hero .club-action[data-club-share] span { display: none; }
.club-hero .club-action.is-quiet {
  flex: 1 0 100%;
  justify-content: flex-end;
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

/* Phones: a smaller logo, and Edit Club as a pencil so the name has room. */
@media (max-width: 440px) {
  .club-hero .identity-block { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .club-hero .club-hero-avatar { width: 84px; height: 84px; border-radius: 16px; }
  .club-hero .club-edit-button { width: 34px; padding: 0; justify-content: center; }
  .club-hero .club-edit-button span:not(.profile-edit-icon) { display: none; }
  .club-hero:has(.club-edit-button) .identity-copy h1 { padding-right: 40px; }
  .club-hero .club-action { font-size: 13px; }
}
.club-hero .club-action svg { flex: 0 0 18px; }
.club-hero .club-edit-button { height: 34px; }

/* The header stacks at every width: identity, then the action row. */
.club-hero.profile-hero { display: block; }
.club-hero .club-actions { max-width: 720px; }
@media (max-width: 440px) {
  .club-hero .club-action { gap: 5px; padding: 0 8px; font-size: 12.5px; }
  .club-hero .club-action svg { flex-basis: 16px; width: 16px; height: 16px; }
}
@media (max-width: 440px) {
  .club-hero .club-action.is-primary { flex-grow: 1.35; }
  .club-hero .club-edit-button { min-width: 34px; flex: 0 0 34px; }
}
@media (max-width: 440px) {
  .club-hero .club-action { padding: 0 6px; gap: 4px; }
}

/* ==========================================================================
   COURTCAST CLUB PROFILE — TABLET LAYOUT FIX 2026-09-25

   Phone portrait remains unchanged.

   Tablet behavior:
   - centered app layout
   - max content width 820px
   - single-column Overview
   - no About / Events side-by-side squeeze
   - stable hero identity grid
   - stable action row
   - works in tablet portrait and landscape
   ========================================================================== */


/* --------------------------------------------------------------------------
   TABLET PORTRAIT + LANDSCAPE

   min-height prevents this from taking over normal phone-landscape layouts.
   -------------------------------------------------------------------------- */

@media (min-width: 600px) and (min-height: 600px) {

  /* ------------------------------------------------------------------------
     PAGE WIDTH

     Existing CourtCast tablet rules allow Club Profile to grow too wide.
     Keep it app-like and centered instead.
     ------------------------------------------------------------------------ */

  html body #profile-app.club-page {
    width: min(calc(100% - 32px), 820px) !important;
    max-width: 820px !important;

    margin-right: auto !important;
    margin-left: auto !important;

    padding:
      16px
      0
      calc(116px + env(safe-area-inset-bottom))
      0 !important;
  }


  /* ------------------------------------------------------------------------
     HERO CARD
     ------------------------------------------------------------------------ */

  html body #profile-app.club-page .club-hero {
    width: 100%;

    margin: 0;

    padding: 18px;

    border-radius: 20px;
  }


  /* ------------------------------------------------------------------------
     IDENTITY

     Explicit grid prevents older tablet rules from letting the avatar,
     title and edit control collide.
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-hero
  .identity-block {
    position: relative;

    display: grid !important;

    grid-template-columns:
      128px
      minmax(0, 1fr)
      auto !important;

    grid-template-rows: auto;

    align-items: start !important;

    column-gap: 18px !important;
    row-gap: 0 !important;

    width: 100%;
  }


  /* ------------------------------------------------------------------------
     CLUB LOGO
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-hero-avatar {
    grid-column: 1;
    grid-row: 1;

    width: 128px !important;
    height: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;

    margin: 0 !important;

    align-self: start;

    border-radius: 17px;
  }

  html body
  #profile-app.club-page
  .club-hero-avatar img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;

    padding: 5px;

    object-fit: contain !important;

    transform: none !important;
  }


  /* ------------------------------------------------------------------------
     CLUB IDENTITY COPY
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-hero
  .identity-copy {
    grid-column: 2;
    grid-row: 1;

    min-width: 0;

    width: auto;

    padding:
      4px
      0
      0 !important;
  }

  html body
  #profile-app.club-page
  .club-hero
  .identity-copy h1 {
    max-width: 100%;

    margin: 0;

    font-size: 30px;
    line-height: 1.02;

    overflow-wrap: anywhere;
  }

  html body
  #profile-app.club-page
  .club-hero-location,
  html body
  #profile-app.club-page
  .club-hero-members {
    font-size: 13px;
  }

  html body
  #profile-app.club-page
  .club-hero-meta {
    margin-top: 7px;
  }

  html body
  #profile-app.club-page
  .club-hero-chip {
    font-size: 11px;
  }

  html body
  #profile-app.club-page
  .club-hero
  .identity-subtitle {
    margin-top: 7px;

    font-size: 11px;
  }


  /* ------------------------------------------------------------------------
     EDIT CLUB
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-hero
  .club-edit-button {
    position: static !important;

    grid-column: 3;
    grid-row: 1;

    align-self: start;
    justify-self: end;

    min-width: max-content;

    margin: 0 !important;

    padding-inline: 12px;

    transform: none !important;
  }


  /* ------------------------------------------------------------------------
     ACTION ROW
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-hero
  .club-actions {
    display: grid !important;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1.35fr)
      52px !important;

    align-items: stretch;

    gap: 9px;

    width: 100%;

    margin-top: 16px;
  }

  html body
  #profile-app.club-page
  .club-hero
  .club-action {
    min-width: 0;

    min-height: 46px;

    margin: 0 !important;

    font-size: 13px;
  }

  html body
  #profile-app.club-page
  .club-hero
  .club-action[data-club-share] {
    width: 52px !important;
  }


  /* Leave stays quiet and underneath. */

  html body
  #profile-app.club-page
  .club-hero
  .club-action.is-quiet {
    grid-column: 1 / -1;

    justify-self: end;

    min-height: 32px;

    margin-top: 0 !important;
  }


  /* ------------------------------------------------------------------------
     TABS
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .section-tabs.club-page-tabs {
    width: 100%;

    margin-top: 14px;

    grid-template-columns:
      repeat(5, minmax(0, 1fr)) !important;
  }

  html body
  #profile-app.club-page
  .section-tabs.club-page-tabs button {
    min-height: 66px;

    font-size: 11px;
  }


  /* ------------------------------------------------------------------------
     OVERVIEW

     This is the major tablet fix.

     Never put About and Events beside one another on tablets.
     They are too narrow and produce the layout shown in the screenshots.
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-page-view
  .content-grid,
  html body
  #profile-app.club-page
  .club-page-view
  .content-grid.two-column {
    display: grid !important;

    grid-template-columns:
      minmax(0, 1fr) !important;

    grid-auto-flow: row !important;

    gap: 12px !important;

    width: 100% !important;
  }


  /* Every Overview card fills the app width. */

  html body
  #profile-app.club-page
  .club-page-view
  .content-card {
    grid-column: 1 !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;

    padding: 18px;

    border-radius: 18px;
  }

  html body
  #profile-app.club-page
  .club-page-view
  .content-card > .card-heading h2 {
    font-size: 20px;
  }


  /* ------------------------------------------------------------------------
     ABOUT
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-about-bio {
    max-width: 680px;

    font-size: 14px;
    line-height: 1.5;
  }

  html body
  #profile-app.club-page
  .club-about-facts div {
    grid-template-columns:
      76px
      minmax(0, 1fr);

    font-size: 12px;
  }


  /* ------------------------------------------------------------------------
     EVENTS

     Full-width rows instead of the narrow right-hand column seen in the
     tablet screenshots.
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-event-row {
    width: 100%;

    min-height: 58px;

    grid-template-columns:
      auto
      minmax(0, 1fr) !important;

    gap: 10px;
  }

  html body
  #profile-app.club-page
  .club-event-row strong {
    max-width: none;

    white-space: normal;
  }


  /* ------------------------------------------------------------------------
     MEMBERS
     ------------------------------------------------------------------------ */

  html body
  #profile-app.club-page
  .club-member-row {
    width: 100%;

    min-height: 58px;
  }
}


/* ==========================================================================
   LARGE TABLET LANDSCAPE

   Still keep the app itself at 820px.
   Do not transform this page into a desktop dashboard.
   ========================================================================== */

@media (min-width: 1000px) and (min-height: 600px) {

  html body #profile-app.club-page {
    width: 820px !important;
    max-width: 820px !important;
  }

  html body
  #profile-app.club-page
  .club-page-view
  .content-grid.two-column {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }
}


/* ==========================================================================
   COURTCAST CLUB PROFILE — FORCE SINGLE OVERVIEW 2026-09-25

   Overview remains a vertical app layout on:
   - phones
   - phone landscape
   - tablet portrait
   - tablet landscape
   - desktop preview

   About / Events / Members never become side-by-side dashboard columns.
   ========================================================================== */

html body #profile-app.club-page
.club-page-view .content-grid,

html body #profile-app.club-page
.club-page-view .content-grid.two-column {
  display: grid !important;

  grid-template-columns:
    minmax(0, 1fr) !important;

  grid-template-rows: auto !important;

  grid-auto-flow: row !important;

  gap: 12px !important;

  width: 100% !important;
  max-width: 100% !important;
}


/* Every Overview card owns a complete row. */

html body #profile-app.club-page
.club-page-view .content-card {
  grid-column: 1 / -1 !important;

  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;

  margin-right: 0 !important;
  margin-left: 0 !important;
}


/* Remove any tablet/desktop placement rules inherited by individual cards. */

html body #profile-app.club-page
.club-page-view .content-card:nth-child(1),

html body #profile-app.club-page
.club-page-view .content-card:nth-child(2),

html body #profile-app.club-page
.club-page-view .content-card:nth-child(3) {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
}


/* Events content also gets the full available card width. */

html body #profile-app.club-page
.club-page-view .club-event-list,

html body #profile-app.club-page
.club-page-view .club-event-row {
  width: 100% !important;
  max-width: none !important;
}


/* Tablet-specific proportions, without changing the single-column model. */

@media (min-width: 600px) and (min-height: 600px) {

  html body #profile-app.club-page
  .club-page-view .content-card {
    padding: 18px !important;
  }

  html body #profile-app.club-page
  .club-about-bio {
    max-width: 720px;
  }
}


/* ==========================================================================
   COURTCAST CLUB LIST SHARED TABLET WIDTH REPAIR 2026-09-25
   ========================================================================== */

@media (min-width: 600px) and (min-height: 600px) {

  /*
   * /clubs only.
   * Open Play also uses clubs-page markup, so exclude its branded hero.
   */

  body #profile-app.clubs-page:not(:has(.open-play-hero-brand)) {
    width: min(calc(100% - 32px), 820px) !important;
    max-width: 820px !important;

    margin-right: auto !important;
    margin-left: auto !important;
  }


  /*
   * /clubs/:id
   * Keep the already-approved Club Profile at the same shared width.
   */

  body #profile-app.club-page {
    width: min(calc(100% - 32px), 820px) !important;
    max-width: 820px !important;

    margin-right: auto !important;
    margin-left: auto !important;
  }
}
