/* ==========================================================================
   Prime Time: the Bosses shelf (/bosses/).
   Page layer on top of assets/prime.css and assets/team-kits.css. Classes are
   sh-* so nothing here collides with the boss profile pages.
   Shelf layouts by width:
     1180+      five plates per row, crest on top
     640-1179   two plates per row, crest at the left
     under 640  one plate per row, crest at the left
   Team colour appears only in the band rule, the boss line and the crest;
   cards stay on the card tone and volt stays the league's (odds, live).
   ========================================================================== */

/* ---------- header ---------- */
body.pt .sh-head { padding: 64px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: end; }
body.pt .sh-title { font-size: clamp(120px, 12.5vw, 160px); margin-top: 14px; }
body.pt .sh-sub { font-size: 20px; line-height: 1.5; color: var(--pt-tx2); max-width: 52ch; margin-top: 24px; text-wrap: pretty; }

body.pt a.sh-champ { display: flex; align-items: center; gap: 20px; padding: 18px 22px 18px 18px; border-radius: 16px; position: relative; overflow: hidden; }
body.pt a.sh-champ::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--team-band, var(--pt-line-2)); }
body.pt .sh-champ-mark { flex: none; width: 96px; }
body.pt .sh-champ-mark .sh-crest, body.pt .sh-champ-mark .fbi-crest { width: 96px; height: auto; display: block; }
body.pt .sh-champ-t { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
body.pt .sh-champ-k { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pt-ac); }
body.pt .sh-champ-n { font-size: 40px; margin-top: 2px; overflow-wrap: anywhere; }
body.pt .sh-champ-s { font-size: 14px; color: var(--pt-tx3); line-height: 1.4; overflow-wrap: anywhere; }

/* ---------- section extras ---------- */
body.pt .sh-sec-side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
body.pt .sh-sec-note { font-size: 16px; line-height: 1.5; color: var(--pt-tx2); max-width: 38ch; text-wrap: balance; }
@media (max-width: 899px) { body.pt .sh-sec-side { flex-basis: 100%; } }
@media (min-width: 900px) {
  body.pt .sh-sec-side { align-items: flex-end; margin-left: auto; }
  body.pt .sh-sec-note { text-align: right; }
}
body.pt .sh-notice { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
body.pt .sh-notice p { max-width: 60ch; }
body.pt .sh-notice strong { color: var(--pt-tx); }
body.pt .sh-notice .pt-btn-ghost { cursor: pointer; }

/* ---------- the shelf ---------- */
body.pt .sh-shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
body.pt .sh-item { display: flex; min-width: 0; }
body.pt .sh-plate { position: relative; display: flex; flex-direction: column; width: 100%; padding: 22px 18px 18px; overflow: hidden; container-type: inline-size; transition: border-color .15s var(--pt-ease); }
body.pt .sh-plate:hover, body.pt .sh-plate.is-champ { border-color: var(--pt-line-2); }
body.pt .sh-band { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--team-band, var(--pt-line-2)); }
body.pt .sh-rank { position: absolute; z-index: 1; top: 16px; left: 16px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; background: var(--pt-s2); border: 1px solid var(--pt-line-2); color: var(--pt-tx); font-size: 22px; line-height: 1; }

body.pt .sh-mark { display: flex; justify-content: center; padding: 14px 0 6px; }
body.pt .sh-crest { display: block; position: relative; width: 200px; max-width: 100%; aspect-ratio: 10 / 11; }
body.pt .sh-crest > img, body.pt .sh-crest > svg { display: block; width: 100%; height: 100%; }
body.pt .sh-mono { display: grid; place-items: center; border-radius: 14px; background: var(--team-field, var(--pt-s2)); color: var(--team-light, var(--pt-tx2)); border: 3px solid var(--team-band, var(--pt-line-2)); }
body.pt .sh-plate:hover .sh-crest { transform: translateY(-3px); }
body.pt .sh-crest { transition: transform .3s var(--pt-ease); }

body.pt .sh-body { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; padding-top: 10px; }
body.pt .sh-boss { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-width: 0; font-size: 15px; font-weight: 700; color: var(--team-accent, var(--pt-tx2)); }
body.pt .sh-face, body.pt .sh-boss .pt-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; box-shadow: 0 0 0 1px var(--pt-line-2); background: var(--pt-s2); }
body.pt .sh-boss-n { min-width: 0; }
body.pt .sh-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid var(--pt-line-2); border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--pt-tx2); line-height: 1; }
body.pt .sh-team { font-size: clamp(26px, 13cqw, 32px); line-height: .95; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
body.pt .sh-team a { color: var(--pt-tx); display: inline-block; max-width: 100%; min-height: 44px; padding: 8px 0; margin: -8px 0; }
body.pt .sh-plate:hover .sh-team a { color: var(--pt-ac); }
/* the whole plate is the link target */
body.pt .sh-team a::after { content: ""; position: absolute; inset: 0; border-radius: var(--pt-radius); }
body.pt .sh-flag { position: absolute; z-index: 1; top: 16px; right: 16px; max-width: calc(100% - 80px); min-height: 28px; padding: 5px 10px; border-radius: 999px; background: var(--pt-s2); border: 1px solid var(--pt-line-2); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pt-tx); line-height: 1.15; text-align: right; }

body.pt .sh-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 14px; margin: 0; padding-top: 14px; border-top: 1px solid var(--pt-line); }
body.pt .sh-stats > div { min-width: 0; }
body.pt .sh-stats dt { font-size: 14px; color: var(--pt-tx3); white-space: nowrap; }
body.pt .sh-stats dd { margin: 4px 0 0; font-size: 24px; line-height: 1; white-space: nowrap; color: var(--pt-tx); }

body.pt .sh-odds { display: grid; gap: 8px; }
body.pt .sh-odds-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--pt-tx3); }
body.pt .sh-odds-top .pt-n { font-size: 20px; color: var(--pt-tx); line-height: 1; }
body.pt .sh-odds-s { font-size: 14px; font-weight: 700; color: var(--pt-tx2); }
body.pt .sh-odds-s.pt-win { color: var(--pt-ac); }

body.pt .sh-live { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pt-tx2); }
body.pt .sh-live .pt-dot { color: var(--pt-ac); }
body.pt .sh-live b { font-size: 16px; color: var(--pt-tx); }

body.pt .sh-career { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--pt-line); font-size: 15px; line-height: 1.45; color: var(--pt-tx2); }
body.pt .sh-career .pt-n { color: var(--pt-tx); font-size: 16px; }
body.pt .sh-career b { color: var(--pt-tx); }
body.pt .sh-years { color: var(--pt-tx3); font-size: 14px; font-variant-numeric: tabular-nums; }
body.pt .sh-none { color: var(--pt-tx3); }

body.pt .sh-skel { min-height: 560px; border-radius: var(--pt-radius); list-style: none; }

/* ---------- era row: former members ---------- */
body.pt .sh-era { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
body.pt .sh-era-card { position: relative; width: 100%; padding: 20px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; transition: border-color .15s var(--pt-ease); }
body.pt .sh-era-card:hover { border-color: var(--pt-line-2); }
body.pt .sh-era-mark .sh-crest { width: 96px; }
body.pt .sh-era-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; container-type: inline-size; }
body.pt .sh-era-years { font-size: 15px; color: var(--team-accent, var(--pt-tx3)); letter-spacing: .04em; }
body.pt .sh-era-name { font-size: min(36px, 27cqw); min-width: 0; overflow-wrap: anywhere; }
body.pt .sh-era-name a { color: var(--pt-tx); display: inline-block; max-width: 100%; min-height: 44px; padding: 6px 0; margin: -6px 0; }
body.pt .sh-era-card:hover .sh-era-name a { color: var(--pt-ac); }
body.pt .sh-era-name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--pt-radius); }
body.pt .sh-era-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding-top: 10px; border-top: 1px solid var(--pt-line); }
body.pt .sh-era-stats dt { font-size: 14px; color: var(--pt-tx3); }
body.pt .sh-era-stats dd { margin: 2px 0 0; font-size: 22px; line-height: 1; color: var(--pt-tx); }
body.pt .sh-era-card .sh-career { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- championships ---------- */
body.pt .sh-champs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
body.pt .sh-champs > li { display: flex; min-width: 0; }
body.pt .sh-yr { width: 100%; min-height: 156px; padding: 18px 14px 20px; display: flex; flex-direction: column; gap: 10px; }
body.pt a.sh-yr { display: flex; border-radius: var(--pt-radius); }
body.pt .sh-yr-n { font-size: 30px; line-height: 1; color: var(--pt-tx3); }
body.pt .sh-yr-c { font-weight: 700; font-size: 16px; line-height: 1.25; color: var(--pt-tx); min-width: 0; }
body.pt .sh-yr-c .fbi-team-chip { max-width: 100%; align-items: flex-start; }
body.pt .sh-yr-c .fbi-team-chip__name { white-space: normal; overflow: visible; }
body.pt .sh-yr-c .fbi-crest { margin-top: 1px; }
body.pt .sh-yr-t { font-size: 14px; color: var(--pt-tx3); line-height: 1.35; overflow-wrap: anywhere; }
body.pt .sh-yr.is-latest .sh-yr-n { color: var(--pt-ac); }
body.pt .sh-yr-now { border-style: dashed; border-color: var(--pt-ac); }
body.pt .sh-yr-now .sh-yr-n { color: var(--pt-ac); }

/* keyboard focus: ring the whole card when its link has focus */
@supports selector(:has(*)) {
  body.pt .sh-plate a:focus-visible, body.pt .sh-era-card a:focus-visible { outline: none; }
  body.pt .sh-plate:has(a:focus-visible), body.pt .sh-era-card:has(a:focus-visible) { outline: 2px solid var(--pt-ac); outline-offset: 3px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1239px) {
  body.pt .sh-head { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 48px; }
  body.pt .sh-title { font-size: clamp(96px, 14.5vw, 150px); }
  body.pt a.sh-champ { max-width: 480px; }
  body.pt .sh-champs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1179px) {
  body.pt .sh-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pt .sh-plate { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 20px; align-items: start; padding: 20px 18px 18px; }
  body.pt .sh-band { grid-column: 1 / -1; }
  body.pt .sh-mark { padding: 26px 0 0; align-self: start; }
  body.pt .sh-crest { width: 140px; }
  body.pt .sh-body { padding-top: 4px; container-type: inline-size; }
  body.pt .sh-team { font-size: min(32px, 17cqw); }
  body.pt .sh-flag { position: static; align-self: flex-start; max-width: 100%; margin-top: -6px; text-align: left; }
  body.pt .sh-rank { top: 14px; left: 14px; }
  body.pt .sh-skel { min-height: 360px; }
  body.pt .sh-era { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  body.pt .sh-head { padding-top: 36px; gap: 28px; }
  body.pt .sh-title { font-size: min(72px, 18.6vw); }
  body.pt .sh-sub { font-size: 18px; margin-top: 18px; }
  body.pt a.sh-champ { max-width: none; padding: 16px; gap: 14px; }
  body.pt .sh-champ-mark, body.pt .sh-champ-mark .sh-crest, body.pt .sh-champ-mark .fbi-crest { width: 72px; }
  body.pt .sh-champ-n { font-size: 34px; }
  body.pt .sh-shelf { grid-template-columns: minmax(0, 1fr); }
  body.pt .sh-plate { grid-template-columns: 112px minmax(0, 1fr); gap: 6px 16px; padding: 18px 14px 16px; }
  body.pt .sh-mark { padding-top: 22px; }
  body.pt .sh-crest { width: 112px; }
  body.pt .sh-team { font-size: min(30px, 16cqw); }
  body.pt .sh-rank { top: 12px; left: 12px; min-width: 34px; height: 34px; font-size: 19px; border-radius: 9px; padding: 0 8px; }
  body.pt .sh-stats { gap: 8px 14px; }
  body.pt .sh-stats dd { font-size: 22px; }
  body.pt .sh-career { grid-column: 1 / -1; }
  body.pt .sh-skel { min-height: 300px; }
  body.pt .sh-era { grid-template-columns: minmax(0, 1fr); }
  body.pt .sh-era-card { grid-template-columns: 88px minmax(0, 1fr); padding: 16px; gap: 14px; }
  body.pt .sh-era-mark .sh-crest { width: 88px; }
  body.pt .sh-era-name { font-size: 32px; }
  body.pt .sh-champs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body.pt .sh-yr { min-height: 136px; padding: 16px 12px 18px; }
  body.pt .sh-notice { padding: 20px; }
}
@media (max-width: 380px) {
  body.pt .sh-plate { grid-template-columns: 92px minmax(0, 1fr); gap: 6px 12px; }
  body.pt .sh-crest { width: 92px; }
  body.pt .sh-team { font-size: min(26px, 16cqw); }
  body.pt .sh-stats dd { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  body.pt .sh-plate, body.pt .sh-crest, body.pt .sh-era-card { transition: none; }
  body.pt .sh-plate:hover .sh-crest { transform: none; }
}
