/* An academy without a page yet (academy_unclaimed.php, /club/<key>). Builds on styles/team.css, styles/hub.css and
   styles/photocards.css; --bc-* tokens, so light and dark mode follow. Phone first. */

/* Hero: the photo mosaic (or the gradient and the flag), name, place, a line about it, actions, numbers, belts */
.bc-cpg-hero { isolation: isolate; }
.bc-cpg-hero.is-plain .bc-pc-mosaic.is-empty { height: 170px; }
.bc-cpg-bigflag { position: absolute; right: -6px; top: -34px; z-index: 0; font-size: 210px; line-height: 1; opacity: .3; transform: rotate(-8deg); pointer-events: none; }
.bc-cpg-hero .bc-pc-hero-body { z-index: 1; }
.bc-cpg-hero .bc-pc-hero-logo b { font-size: 42px; }
.bc-cpg-hero .bc-pc-kicker span { letter-spacing: 0; }
.bc-cpg-where { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; font-size: 14px; color: var(--bc-ink-2); }
.bc-cpg-where > span { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; }
.bc-cpg-where i { color: var(--bc-muted); font-size: 12.5px; }
.bc-cpg-where a { color: var(--bc-ink); font-weight: 600; text-decoration: none; }
.bc-cpg-where a:hover { text-decoration: underline; }
.bc-cpg-intro { margin: 16px 24px 0; max-width: 760px; font-size: 15.5px; line-height: 1.55; color: var(--bc-ink-2); }

.bc-cpg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 24px 0; }
.bc-cpg-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 1.2;
  color: var(--bc-ink) !important; background: var(--bc-surface-2); box-shadow: inset 0 0 0 1px var(--bc-line); text-decoration: none !important; transition: transform .15s ease, filter .15s ease; }
.bc-cpg-btn:hover { transform: translateY(-1px); }
.bc-cpg-btn:focus-visible { outline: none; box-shadow: var(--bc-ring, 0 0 0 3px rgba(91, 75, 209, .35)); }
.bc-cpg-btn i { font-size: 13.5px; opacity: .85; }
.bc-cpg-btn.is-primary { color: var(--bc-surface) !important; background: var(--bc-ink); box-shadow: none; }
.bc-cpg-btn.is-on { cursor: default; background: rgba(22, 163, 74, .1); box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .35); }
.bc-cpg-btn.is-on:hover { transform: none; }
.bc-cpg-btn.is-on i { color: #16a34a; opacity: 1; }
.bc-cpg-actions .bc-vs-btn { min-height: 42px; border-radius: 999px; }
.bc-cpg-login { font-size: 13px; color: var(--bc-muted); margin-left: 4px; }
.bc-cpg-login a { color: var(--bc-ink-2); font-weight: 700; }

.bc-cpg-keys { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.bc-cpg-keys dt { line-height: 1.3; }
.bc-cpg-belts { padding: 0 24px 22px; }
.bc-cpg-belts .bc-tm-bar { height: 14px; border-radius: 7px; }
.bc-cpg-belts .bc-tm-legend { margin-top: 10px; font-size: 13px; }

/* Portraits: a little smaller than on the team page, so a few fill a row */
.bc-cpg-portraits { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Member faces: two columns in the wider half */
.bc-cpg-thumbs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bc-cpg-thumbs b .bc-hub-ver { font-size: 11px; margin-left: 2px; }

/* Who promoted them */
.bc-cpg-coaches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bc-cpg-coaches a, .bc-cpg-coaches li > div { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none !important; min-width: 0; }
.bc-cpg-coaches a:hover { background: var(--bc-surface-2); }
.bc-cpg-coaches li > * > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.bc-cpg-coaches b { color: var(--bc-ink); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.bc-cpg-coaches a b { text-decoration: underline; text-decoration-color: var(--bc-line); text-underline-offset: 3px; }
.bc-cpg-coaches small { color: var(--bc-muted); font-size: 12.5px; }
.bc-cpg-coach-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bc-surface-2); color: #b7791f; box-shadow: inset 0 0 0 1px var(--bc-line); }

/* Recent promotions: one row per person with the belts they went through */
.bc-cpg-promos a > span { gap: 2px; }
.bc-cpg-trail { display: flex; align-items: center; gap: 4px; margin: 2px 0 1px; }
.bc-cpg-trail i { width: 26px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.bc-cpg-arrow { width: 0; height: 0; border-left: 5px solid var(--bc-muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; opacity: .6; }
.bc-cpg-promos small { white-space: normal !important; }

/* Map */
.bc-cpg-map { height: 220px; border-radius: 16px; overflow: hidden; background: var(--bc-surface-2); box-shadow: inset 0 0 0 1px var(--bc-line); position: relative; z-index: 0; }
.bc-cpg-map.is-failed { display: none; }
.bc-cpg-map + .bc-hub-note i { color: var(--bc-muted); margin-right: 2px; }

/* Academies nearby: cards with logo or initials, place, distance */
.bc-cpg-near { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bc-cpg-near a { display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 12px; border-radius: 16px; background: var(--bc-surface-2); text-decoration: none !important; min-width: 0; transition: transform .15s ease, box-shadow .15s ease; }
.bc-cpg-near a:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -18px rgba(16, 16, 30, .5); }
.bc-cpg-near-logo { position: relative; flex: none; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(calc(var(--t, 0) * 60 + 190) 70% 60% / .28), hsl(calc(var(--t, 0) * 60 + 230) 70% 55% / .45)), var(--bc-surface); box-shadow: inset 0 0 0 1px var(--bc-line); }
.bc-cpg-near-logo b { font-size: 15px; font-weight: 800; color: var(--bc-ink-2); letter-spacing: -0.02em; }
.bc-cpg-near-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; z-index: 1; }
.bc-cpg-near-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bc-cpg-near-text b { color: var(--bc-ink); font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-cpg-near-text small { display: block; color: var(--bc-muted); font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-cpg-near-text small i { width: 12px; margin-right: 5px; font-size: 11px; opacity: .8; }
.bc-cpg-near-meta { color: var(--bc-ink-2) !important; font-weight: 600; white-space: normal !important; }

@media (max-width: 600px) {
  .bc-cpg-bigflag { font-size: 160px; top: -24px; }
  .bc-cpg-intro { margin: 14px 18px 0; font-size: 15px; }
  .bc-cpg-actions { margin: 14px 18px 0; }
  .bc-cpg-actions .bc-cpg-btn { flex: 1 1 auto; justify-content: center; }
  .bc-cpg-actions .bc-cpg-btn.is-primary { flex-basis: 100%; }
  .bc-cpg-login { width: 100%; text-align: center; margin: 2px 0 0; }
  .bc-cpg-belts { padding: 0 18px 18px; }
  .bc-cpg-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-cpg-portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-cpg-near { grid-template-columns: 1fr; gap: 8px; }
  .bc-cpg-map { height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .bc-cpg-btn, .bc-cpg-near a { transition: none; } }

/* Faces strip: members' portraits side by side when there are no wide photos */
.bc-pc-mosaic.bc-cpg-faces { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); height: 260px; }
.bc-cpg-faces.f3 { --n: 3; } .bc-cpg-faces.f4 { --n: 4; } .bc-cpg-faces.f5 { --n: 5; } .bc-cpg-faces.f6 { --n: 6; }
.bc-cpg-faces span { grid-row: auto !important; }
.bc-cpg-faces img { object-position: 50% 22%; }
@media (max-width: 600px) {
  .bc-pc-mosaic.bc-cpg-faces { --n: 3 !important; height: 180px; }
  .bc-cpg-faces span:nth-child(n+4) { display: none; }
}
.bc-cpg-hero .bc-pc-kicker > span:first-child { margin-right: 3px; }
