/* /clubs: the clubs directory in the lobby's language (lobby.css: the top row, the menu, the dark panel), the clubs as
   paper cards with ink edges and hard drop shadows, like the lobby's games.
   The colours mean something: every kind of club has one, on its tab, its cards and its sticker.
   Youth cyan · Uni grape · Regular lime · School orange · Pro pink. */
main.clubs {
  --tag-uni: var(--grape);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: min(100% - 2 * var(--gutter), 1440px); margin: 0 auto; padding: 18px 0 calc(var(--tabbar) + 40px);
}
.clubs__panel { gap: 16px; }
.clubs__search { width: 100%; }
/* a kind's count, small inside its menu button */
.mode__n { margin-left: 8px; padding: 2px 5px 1px; font-size: 10px; color: var(--muted); background: rgba(241, 239, 230, 0.08); }
.mode[aria-selected="true"] .mode__n { color: var(--ink); background: var(--tone); }
.tone-all { --tone: var(--paper); --tone-ink: var(--ink); }
.tone-youth { --tone: var(--tag-youth); --tone-ink: var(--ink); }
.tone-uni { --tone: var(--tag-uni); --tone-ink: var(--paper); }
.tone-regular { --tone: var(--tag-regular); --tone-ink: var(--ink); }
.tone-school { --tone: var(--tag-school); --tone-ink: var(--ink); }
.tone-pro { --tone: var(--tag-pro); --tone-ink: var(--ink); }

/* ---------- the clubs: paper posters, each in its kind's colour ---------- */
.clubgrid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; margin-top: 18px; }
.clubgrid > li:nth-child(3n + 1) .clubcard { --tilt: -0.8deg; }
.clubgrid > li:nth-child(3n + 2) .clubcard { --tilt: 0.6deg; }
.clubgrid > li:nth-child(3n) .clubcard { --tilt: -0.3deg; }
.clubcard {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; height: 100%;
  padding: 16px 16px 18px; color: var(--ink); text-decoration: none; background: var(--paper);
  border: var(--edge) solid var(--ink); box-shadow: 6px 6px 0 var(--tone); rotate: var(--tilt, 0deg);
  transition: rotate var(--fast) var(--pop), transform var(--fast) var(--pop), box-shadow var(--fast);
}
.clubcard:hover, .clubcard:focus-visible { rotate: 0deg; transform: translate(-2px, -3px); box-shadow: 9px 9px 0 var(--tone); }
.clubcard:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; }
.clubcard__crest { width: 58px; height: 58px; object-fit: contain; }
.clubcard__crest--initials {
  display: grid; place-items: center; font: 800 19px/1 var(--brand); letter-spacing: -0.04em;
  color: var(--tone-ink); background: var(--tone); border: var(--edge) solid var(--ink); border-radius: 10px 10px 28px 28px;
  box-shadow: 2px 2px 0 var(--ink); rotate: -4deg;
}
.clubcard__body { display: grid; gap: 5px; min-width: 0; }
.clubcard__name { font-family: var(--brand); font-weight: 800; font-size: 15px; line-height: 1.12; letter-spacing: -0.04em; }
.clubcard__where { font-size: 12.5px; font-weight: 600; color: rgba(16, 16, 20, 0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clubcard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.tagchip { padding: 3px 7px 2px; font: 800 9.5px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); }
.tagchip--youth { background: var(--tag-youth); }
.tagchip--uni { color: var(--paper); background: var(--tag-uni); }
.tagchip--regular { background: var(--tag-regular); }
.tagchip--school { background: var(--tag-school); }
.tagchip--futsal { background: var(--cyan); }
.tagchip--pro { background: var(--tag-pro); }
.tagchip--example { color: var(--paper); background: var(--ink); }
/* the full club pages: side by side across the panel */
.clubcard.is-example { padding: 20px 20px 22px; }
.clubcard.is-example .clubcard__crest { width: 84px; height: 84px; }
.clubcard.is-example .clubcard__name { font-size: 22px; }
.clubgrid__none {
  grid-column: 1 / -1; display: grid; gap: 6px; justify-items: center; padding: 30px; text-align: center; color: var(--ink);
  background: var(--paper); border: var(--edge) solid var(--ink); box-shadow: 6px 6px 0 var(--grape); rotate: -0.4deg;
}
.clubgrid__none b { font-family: var(--brand); font-size: 18px; letter-spacing: -0.04em; }
.clubs__more {
  display: block; margin: 30px auto 0; min-height: 46px; padding: 0 22px; font: 800 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: var(--paper); border: var(--edge) solid var(--ink); box-shadow: 4px 4px 0 var(--cyan); cursor: pointer; rotate: 1deg;
}
.clubs__source { margin-top: 30px; font-size: 12px; color: var(--ash); }
@media (max-width: 599px) {
  .clubgrid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (prefers-reduced-motion: reduce) { .clubcard { transition: none; } }
/* parabôla United's card: its Galáctico medal, big */
.clubcard.is-house .clubcard__crest { width: 140px; height: 108px; margin: -10px -6px -10px -10px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }

/* top right: my club over the kinds menu */
.clubs__right { display: grid; justify-items: stretch; gap: 12px; }
.myclub__who { grid-template-columns: minmax(0, 1fr) minmax(160px, 300px); align-items: center; column-gap: 28px; }
.myclub__kicker, .myclub__name, .myclub__none { grid-column: 1; }
.myclub__level { grid-column: 2; grid-row: 1 / span 2; }
.myclub { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-width: 330px; padding: 10px 16px 10px 10px; color: var(--text); text-decoration: none; background: var(--panel); border: 1px solid var(--hair); transition: border-color var(--fast), transform var(--fast) var(--pop); }
a.myclub[href]:hover { border-color: var(--lime); transform: translateY(-2px); }
.myclub__crest { width: 96px; height: 70px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(198, 255, 61, 0.25)); }
.myclub__who { display: grid; gap: 5px; min-width: 0; }
.myclub__kicker { font: 800 9.5px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.myclub__name { font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: 30px; line-height: 0.9; text-transform: uppercase; text-shadow: -2px 2px 0 var(--pink), 2px -1px 0 var(--cyan); white-space: nowrap; }
.myclub__level { display: grid; grid-template-columns: auto minmax(80px, 1fr); align-items: center; gap: 8px; }
.myclub__level .you__lvl { padding: 3px 6px 2px; font: 800 9px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); }
.myclub__level .you__bar { width: 100%; height: 6px; appearance: none; border: 0; background: rgba(241, 239, 230, 0.16); }
.myclub__level .you__bar::-webkit-progress-bar { background: rgba(241, 239, 230, 0.16); }
.myclub__level .you__bar::-webkit-progress-value { background: var(--lime); }
.myclub__level .you__bar::-moz-progress-bar { background: var(--lime); }
/* no club yet: faint stripes, an empty shield outline, the words */
.myclub.is-empty, .myclub.is-loading { background: repeating-linear-gradient(-45deg, rgba(241, 239, 230, 0.035) 0 10px, transparent 10px 20px), var(--panel); border-style: dashed; }
.myclub.is-loading { min-height: 92px; }
.myclub.is-empty .myclub__crest { display: block; width: 58px; height: 68px; margin: 0 19px; border: 2px dashed rgba(241, 239, 230, 0.18); border-radius: 10px 10px 30px 30px; filter: none; }
.myclub__none { font: 800 18px/1.1 var(--brand); letter-spacing: -0.04em; text-transform: uppercase; color: rgba(241, 239, 230, 0.35); }
@media (max-width: 760px) { .clubs__right { width: 100%; } .myclub { min-width: 0; } .myclub__who { grid-template-columns: minmax(0, 1fr); } .myclub__level { grid-column: 1; grid-row: auto; } }

/* "Find your CLUB": the club colour is purple: paper letters with a three-step purple extrude */
main.clubs .lobbycity__name { color: var(--paper); text-shadow: 3px 3px 0 #b388ff, 6px 6px 0 #7c4dff, 9px 9px 0 #3d1f8c; }

/* My club, first in the list: the club's card, wider, with a purple "My club" sticker and its level on the right.
   Signed out, the same slot striped and empty. The other clubs follow under it. */
.clubs__mine { margin-bottom: 4px; }
.clubs__mine-slot.is-loading { min-height: 120px; background: repeating-linear-gradient(-45deg, rgba(241, 239, 230, 0.035) 0 10px, transparent 10px 20px); border: 1px dashed var(--hair); }
.clubcard.is-mine { position: relative; grid-template-columns: auto minmax(0, 1fr) minmax(180px, 280px); align-items: center; padding-top: 26px; }
.clubs__mine-tag {
  position: absolute; top: -12px; left: 18px; z-index: 1; padding: 5px 10px 4px; font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: #b388ff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 #3d1f8c; rotate: -3deg;
}
.clubs__mine-level { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; }
.clubs__mine-level .you__lvl { padding: 4px 7px 3px; font: 800 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); rotate: -2deg; }
.clubs__mine-level .you__bar { width: 100%; height: 8px; appearance: none; border: 0; background: rgba(16, 16, 20, 0.15); }
.clubs__mine-level .you__bar::-webkit-progress-bar { background: rgba(16, 16, 20, 0.15); }
.clubs__mine-level .you__bar::-webkit-progress-value { background: var(--ink); }
.clubs__mine-level .you__bar::-moz-progress-bar { background: var(--ink); }
.clubs__mine-xp { grid-column: 1 / -1; font: 700 10.5px/1 var(--mono); color: rgba(16, 16, 20, 0.6); }
.clubs__mine-slot.is-empty { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 26px 18px 18px;
  background: repeating-linear-gradient(-45deg, rgba(241, 239, 230, 0.035) 0 10px, transparent 10px 20px), var(--panel-2); border: 1px dashed rgba(241, 239, 230, 0.2); }
.clubs__mine-ghost { width: 58px; height: 68px; border: 2px dashed rgba(241, 239, 230, 0.18); border-radius: 10px 10px 30px 30px; }
.clubs__mine-words { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.clubs__mine-none { font: 800 20px/1.1 var(--brand); letter-spacing: -0.04em; text-transform: uppercase; color: rgba(241, 239, 230, 0.4); }
@media (max-width: 699px) { .clubcard.is-mine { grid-template-columns: auto minmax(0, 1fr); } .clubs__mine-level { grid-column: 1 / -1; } }

/* Two columns like Play: the club list on the left (60%), your club on the right (40%) */
main.clubs { grid-template-columns: minmax(0, 6fr) minmax(300px, 4fr); align-content: start; align-items: start; }
main.clubs > :not(.clubs__panel, .clubs__side) { grid-column: 1 / -1; }
.clubs__side .clubs__mine-tag { display: none; }
.clubs__side .clubcard.is-mine { grid-template-columns: auto minmax(0, 1fr); padding-top: 18px; }
.clubs__side .clubs__mine-level { grid-column: 1 / -1; }
.clubs__side .clubs__mine-slot.is-empty { padding-top: 18px; }
@media (max-width: 899px) { main.clubs { grid-template-columns: minmax(0, 1fr); } .clubs__side { grid-row: 2; } }
.clubs__map { margin-top: 0; }
.clubpin { display: grid; place-items: center; width: 46px; height: 46px; padding: 3px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); transition: transform var(--fast) var(--out); }
.clubpin:hover, .clubpin:focus-visible { transform: scale(1.12); }
.clubpin .clubcard__crest { width: 100%; height: 100%; object-fit: contain; font-size: 13px; }
.clubpin.is-mine { width: 56px; height: 56px; background: #b388ff; box-shadow: 3px 3px 0 #3d1f8c; }
/* my club's numbers and its next game, under its card */
.clubs__mine-slot { display: grid; gap: 12px; }
.clubs__minestats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 4px; }
.clubs__minestats--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.clubs__minenext { display: grid; gap: 4px; padding: 12px 14px; color: var(--text); text-decoration: none; background: var(--panel-2); border: 1px solid var(--hair); border-left: 4px solid var(--lime); transition: transform var(--fast) var(--out); }
.clubs__minenext:hover, .clubs__minenext:focus-visible { transform: translateX(3px); }
.clubs__minenext-kicker { font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.clubs__minenext b { font: 800 17px/1.15 var(--brand); letter-spacing: -0.03em; }
.clubs__minenext span:last-child { font-size: 13px; color: var(--muted); }
@media (max-width: 499px) { .clubs__minestats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* my club, centred like a trophy: the crest big on top, the name and its line under it, the level across the bottom */
.clubs__side .clubcard.is-mine { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; padding: 22px 22px 20px; text-align: center; }
.clubs__side .clubcard.is-mine > .clubcard__crest { width: auto; height: 150px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(16, 16, 20, 0.35)); }
.clubs__side .clubcard.is-mine > .clubcard__body { justify-items: center; }
.clubs__side .clubcard.is-mine .clubcard__name { font-size: 24px; }
.clubs__side .clubcard.is-mine .clubcard__tags { justify-content: center; }
.clubs__side .clubs__mine-level { justify-self: stretch; grid-column: 1; margin-top: 4px; }
.clubs__side .clubs__mine-xp { text-align: left; }
/* my club straight on the wall: no panel box, no paper card; light words on the dark */
.clubs__side .clubs__mine.panel { padding: 0; background: none; border: 0; }
.clubs__side .clubcard.is-mine { padding: 6px 0 0; background: none; border: 0; box-shadow: none; rotate: none; clip-path: none; }
.clubs__side .clubcard.is-mine::before, .clubs__side .clubcard.is-mine::after { display: none; }
.clubs__side .clubcard.is-mine .clubcard__name { color: var(--text); }
.clubs__side .clubcard.is-mine .clubcard__where, .clubs__side .clubs__mine-xp { color: var(--muted); }
.clubs__side .clubs__mine-level .you__bar { background: rgba(241, 239, 230, 0.14); }
.clubs__side .clubs__mine-level .you__bar::-webkit-progress-bar { background: rgba(241, 239, 230, 0.14); }
.clubs__side .clubs__mine-level .you__bar::-webkit-progress-value { background: var(--lime); }
.clubs__side .clubs__mine-level .you__bar::-moz-progress-bar { background: var(--lime); }
.clubs__side .clubcard.is-mine > .clubcard__crest { filter: drop-shadow(0 10px 26px rgba(179, 136, 255, 0.4)); }
/* the club list straight on the wall too: no outer box */
/* hover my club: the card stays put, the crest grows toward you and its glow brightens */
.clubs__side .clubcard.is-mine:hover, .clubs__side .clubcard.is-mine:focus-visible { transform: none; }
.clubs__side .clubcard.is-mine > .clubcard__crest { transition: transform 320ms var(--pop), filter 320ms var(--out); transform-origin: 50% 60%; }
.clubs__side .clubcard.is-mine:hover > .clubcard__crest, .clubs__side .clubcard.is-mine:focus-visible > .clubcard__crest { transform: scale(1.16); filter: drop-shadow(0 16px 38px rgba(179, 136, 255, 0.75)); }
@media (prefers-reduced-motion: reduce) { .clubs__side .clubcard.is-mine > .clubcard__crest { transition: none; } }
/* the map in a panel of its own, like the boxes in Play */

/* club cards wear Play's game card: the crest sits on the same dark badge, the club's colour is the card's shadow */
.clubgrid.center__games { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px 18px; margin-top: 10px; }
.clubgame__crest .clubcard__crest { width: 46px; height: 46px; object-fit: contain; border: 0; background: none; }
.clubgame__crest .clubcard__crest--initials { display: grid; place-items: center; font: 800 15px/1 var(--brand); color: var(--paper); }

/* Clubs lines up with Play to the pixel, so switching tabs never moves anything: the header block is as tall as
   Play's city lettering (129px), the title starts where the city starts, and the panel keeps Play's 14px rhythm */
main.clubs .lobbycity { min-height: 129px; align-content: start; }
main.clubs .lobbycity__name { padding-top: 4px; }
.clubs__panel { gap: 14px; }

/* Phone and tablet: the Kind menu and Register a club dock above the bottom tabs, like Play's menu:
   Register a club full width on top, the kinds in one row under it (swipe sideways if they don't fit) */
@media (max-width: 959px) {
  main.clubs { padding-bottom: calc(var(--tabbar) + 140px + env(safe-area-inset-bottom)); }
  main.clubs .lobbytop .lobby__rail {
    position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + 3px + env(safe-area-inset-bottom)); z-index: 40;
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "run" "kinds"; row-gap: 14px;
    width: auto; margin: 0; padding: 10px 10px 8px; background: rgba(18, 19, 16, 0.96); border: 0; border-top: 1px solid var(--hair); backdrop-filter: blur(8px);
  }
  main.clubs .lobby__rail .rail__head { display: none; }
  main.clubs .lobby__rail .rail__set { display: block; width: auto; min-width: 0; }
  main.clubs .lobby__rail .rail__set:first-child { grid-area: kinds; }
  main.clubs .lobby__rail .rail__set:last-child { grid-area: run; }
  main.clubs .lobby__rail .rail__set:first-child .rail__group { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  main.clubs .lobby__rail .rail__set:first-child .rail__group::-webkit-scrollbar { display: none; }
  main.clubs .lobby__rail .rail__set:first-child .mode { flex: 1 0 auto; justify-content: center; padding: 10px 12px 9px; font-size: 10.5px; }
  main.clubs .lobby__rail .rail__set:last-child .rail__group { display: block; }
  main.clubs .lobby__rail .rail__set:last-child .mode--cta { display: flex; justify-content: center; width: 100%; }
}
/* phone: the search, map and clubs first, My club under them */
@media (max-width: 899px) { main.clubs .clubs__side { grid-row: auto; } }
/* no kicker now: CLUB sits at the foot of the header block (where Play's city sits); on phones the block hugs the title */
main.clubs .lobbycity { align-content: end; }
@media (max-width: 959px) { main.clubs .lobbycity { min-height: 0; } main.clubs .lobbytop { row-gap: 0; margin-bottom: 0; } }
/* phone: CLUB as tall as Play's BOSTON lettering (its image is clamp(60px, 14vw, 100px) tall) */
@media (max-width: 959px) { main.clubs .lobbytop .lobbycity .lobbycity__name { font-size: clamp(68px, 16vw, 114px); } }   /* beats the shared type scale in lobby.css */
/* phone: the header block measures what Play's does (its "GAMES IN" line, then the city lettering), with CLUB where
   BOSTON sits, so the panel starts at the same height on both tabs; the docked kinds match Play's buttons */
@media (max-width: 959px) {
  main.clubs .lobbytop .lobbycity { min-height: calc(29.4px + clamp(60px, 14vw, 100px)); align-content: start; padding-top: 18px; box-sizing: border-box; }
  main.clubs .lobbytop { margin-bottom: 4px; }
  main.clubs .lobby__rail .rail__set:first-child .mode { padding: 11px 12px 10px; }
}
@media (max-width: 959px) { main.clubs .lobbytop .lobby__rail { padding-bottom: 9px; } }

/* Kind as a filter: wide screens list every kind (More hides); phones show the kind you're on and More, which pops
   the other kinds up above the bar */
.kinds__more, .kinds__pop { display: none; }
@media (max-width: 959px) {
  main.clubs .lobby__rail .rail__set:first-child .rail__group { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  main.clubs .lobby__rail .rail__set:first-child .rail__group > .mode:not(.kinds__more):not([aria-selected="true"]) { display: none; }   /* the kinds only, never Register a club */
  .kinds__more { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .kinds__chev { transition: transform var(--fast) var(--pop); }
  .is-open > .kinds__more .kinds__chev { transform: rotate(180deg); }
  .kinds__pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 12px); z-index: 3; display: grid; gap: 6px; padding: 8px; background: var(--panel); border: 1px solid var(--hair); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); animation: hostmenu-in 160ms var(--out) both; }
  .kinds__pop[hidden] { display: none; }
  main.clubs .lobby__rail .kinds__pop > .mode { display: flex; justify-content: space-between; width: 100%; }
}

/* ===== One layout system on every tab (2026-11-10), the same widths as Play:
   1101px and up: two columns (60/40). 761–1100 (tablets, small laptops): one column, the right column's parts side by
   side so nothing is left half empty. 760 and under (phones): one column, stacked. ===== */
@media (max-width: 1100px) {
  main.clubs { grid-template-columns: minmax(0, 1fr); }
  main.clubs .clubs__side { grid-row: auto; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .clubs__side .clubs__mine-slot:not(.is-empty):not(.is-loading) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 20px; }
  .clubs__side .clubs__mine-slot > .clubcard.is-mine { grid-row: 1 / span 2; }
}

/* the list in blocks with Play's big heads (New on parabôla, Featured) */
.clubblocks { display: grid; gap: 26px; min-width: 0; }
.clubblocks .clubgrid.center__games { margin-top: 0; }

/* phones and tablets: My club sits under the list, with room above it */
@media (max-width: 899px) { main.clubs > .clubs__side { margin-top: 28px; } }

/* a club's card shows its logo alone: no dark badge around it, the logo fills the space */
.gamecard__crest.clubgame__crest { background: none; border: 0; border-radius: 0; box-shadow: none; rotate: none; }
.gamecard__crest.clubgame__crest .clubcard__crest { width: 100%; height: 100%; object-fit: contain; }
