/* Player card (player/) and Players (players/), client site: phone first (390 px), then tablet and desktop.
   The athlete card wears the hero tokens; data keeps the team / shot-group colours. */
.pp-top { padding-top: 20px; }
.pp-loading { color: var(--muted); padding: 40px 0; }
.pp-empty { margin-top: 12px; }
.pp-empty h1 { font-size: 28px; margin-bottom: 6px; }

/* ---------------------------------------------------------------- athlete card */
.pp-hero { position: relative; display: grid; grid-template-columns: minmax(0, 43%) minmax(0, 1fr); grid-template-areas: "ph meta";
  gap: 16px 16px; padding: 16px; border-radius: var(--radius); color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 90% 70% at 100% 0%, var(--hero-glow), transparent 60%),
              radial-gradient(ellipse 70% 60% at 0% 100%, color-mix(in srgb, var(--ring) 35%, transparent), transparent 70%), var(--hero-bg);
  box-shadow: var(--shadow-3); border: 1px solid rgba(255, 255, 255, 0.06); }
.pp-ph { grid-area: ph; position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-md); overflow: hidden; background: #1e293b; align-self: start;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.pp-ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--ring); }
.pp-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-ph.none { display: flex; align-items: center; justify-content: center; background: var(--ring); }
.pp-ph.none span { font-size: 64px; font-weight: 800; }
.pp-meta { grid-area: meta; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-kicker { display: flex; flex-direction: column; gap: 1px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-on-dark); }
.pp-kicker span + span { color: #94a3b8; letter-spacing: 0.06em; font-weight: 600; }
.pp-name { font-size: 28px; line-height: 1.05; color: #fff; margin: 4px 0 2px; overflow-wrap: anywhere; letter-spacing: -0.02em; }
.pp-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: #e2e8f0; }
.pp-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 8px; border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); font-weight: 800; font-size: 13px; color: #fff; }
.pp-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pp-team i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.pp-desc { font-size: 12.5px; color: #94a3b8; line-height: 1.35; }
.pp-res { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pp-rt { font-size: 21px; font-weight: 800; letter-spacing: -0.015em; color: #e2e8f0; width: 100%; }
.pp-res.won .pp-rt { color: var(--accent-on-dark); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  :root:not([data-brand="shark"]) .pp-res.won .pp-rt { background: linear-gradient(90deg, #ff8d3f, #ffc195); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; width: fit-content; }
}
.pp-rs { font-size: 12px; color: #94a3b8; }

@media (min-width: 480px) { .pp .card-head, .me .card-head { flex-wrap: nowrap; } .pp .card-head > div:first-child, .me .card-head > div:first-child { min-width: 0; } .pp .card-head > .ev, .me .card-head > .ev { flex: none; } }
@media (min-width: 640px) {
  .pp-hero { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); grid-template-areas: "ph meta"; gap: 18px 28px; padding: 22px; }
  .pp-name { font-size: 40px; }
  .pp-kicker { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; }
}
@media (min-width: 1000px) {
  .pp-hero { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); padding: 26px 32px 26px 26px; }
  .pp-name { font-size: 52px; }
  .pp-rt { font-size: 26px; }
}

/* partner + opponents */
.pp-court { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.pp-cl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 6px 2px; }
.pp-opps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pp-mate { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; padding: 4px 8px 4px 2px; border-radius: var(--radius-md); text-decoration: none;
  color: inherit; min-height: 56px; transition: background-color 0.15s; }
.pp-mate:hover { background: var(--brand-tint); }
.pp-mate .av { margin: 6px; }
.pp-mt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pp-mt b { font-size: 15px; }
.pp-mr { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-md { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) { .pp-court { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); padding: 14px 18px; } }

/* same person in other games of the session */
.pp-sess { margin-top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.pp-sh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; margin-bottom: 8px; }
.pp-sg { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pp-sg::-webkit-scrollbar { display: none; }
.pp-sgi { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px 2px 2px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  text-decoration: none; color: inherit; background: var(--surface); min-height: 44px; transition: border-color 0.15s, background-color 0.15s; }
a.pp-sgi:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--border)); background: var(--brand-tint); }
.pp-sgi.on { border-color: var(--brand); background: var(--brand-tint); }
.pp-sgi.off { opacity: 0.6; padding-left: 12px; border-style: dashed; }
.pp-st { display: flex; flex-direction: column; line-height: 1.2; font-size: 12px; color: var(--ink-2); }
.pp-st b { font-size: 13px; color: var(--ink); }

/* numbers */
.pp-sec { padding-top: 36px; }
.pp-sec > .lede { margin-bottom: 16px; }
.pp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.pp-tiles .tile { padding: 16px 14px 12px; }
.pp-tiles .tile .val { font-size: 28px; }
@media (min-width: 640px) { .pp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .pp-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pp-grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pp-mini { margin-top: 12px; font-size: 13px; }
.pp-mini td:first-child { font-weight: 600; white-space: nowrap; }
.pp-ty { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
@media (max-width: 520px) {   /* speed tables: five columns fit a phone; long type names wrap */
  .pp-sp { font-size: 13px; }
  .pp-sp td, .pp-sp th { padding: 8px 6px; }
  .pp-sp th { font-size: 10.5px; letter-spacing: 0.03em; }
  .pp-sp .pp-ty { white-space: normal; align-items: flex-start; }
  .pp-sp .pp-ty .key { margin-top: 0.6em; }
}
.pp-pos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.pp-pos .pl-heat { max-width: 300px; width: 100%; margin: 0 auto; }
@media (min-width: 480px) { .pp-pos { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); } .pp-pos .pl-heat { margin: 0; } }
.pp-arcs .s3d-row[aria-label="Player"] { display: none; }

/* every shot */
.pp-shots { padding: 0; overflow: hidden; }
.pp-list { max-height: 480px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pp-list thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.pp-list tbody tr { cursor: pointer; }
.pp-list tbody tr:hover, .pp-list tbody tr:focus-visible { background: var(--brand-tint); outline: none; }
.pp-list td.o-winner { font-weight: 700; }
.pp-list td.o-net, .pp-list td.o-out, .pp-list td.o-error { color: var(--ink); font-weight: 600; }
.pp-play { text-align: right; width: 44px; }
.pp-play a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-tint-2);
  color: var(--accent-ink); text-decoration: none; font-size: 11px; padding-left: 2px; }
.pp-list tr:hover .pp-play a { background: var(--sel); color: #fff; }
@media (max-width: 520px) {
  .pp-list .tbl { font-size: 12.5px; }
  .pp-list .tbl td, .pp-list .tbl th { padding: 8px 5px; }
  .pp-list .tbl th { font-size: 10.5px; letter-spacing: 0.03em; }
  .pp-list .tbl td:first-child, .pp-list .tbl th:first-child { padding-left: 12px; }
}


/* trends + game list */
.me-trends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .me-trends { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.tr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 10px 6px 12px; box-shadow: var(--shadow); min-width: 0; }
.tr-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px; margin-bottom: 4px; }
.tr-t { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.3; }
.tr-plot svg { display: block; overflow: visible; }
.tr-plot svg text { font-size: 10.5px; }

/* per-game rows */
.me-games { display: grid; gap: 10px; }
.me-g { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 10px 14px 12px 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
a.me-g:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: var(--shadow-2); }
.me-g.off { opacity: 0.65; padding-left: 14px; grid-template-columns: minmax(0, 1fr); }
.me-gm { min-width: 0; display: grid; gap: 3px; padding-top: 4px; }
.me-gt { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.me-gt b { font-size: 15.5px; }
.me-res { font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--muted); }
.me-res.won { color: var(--accent-ink); }
.me-gs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; font-size: 13px; color: var(--ink-2); }
.me-gs .av { margin: 0 3px 0 5px; }
.me-gk { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.me-gk span { font-size: 12px; background: var(--surface-2); border-radius: var(--radius-pill); padding: 2px 9px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.me-gx { font-size: 11.5px; color: var(--muted); }

/* players page: the four-player picker */
.pk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.pk-card .pf-id { font-size: 22px; }
.pp-sh a { font-size: 13.5px; font-weight: 600; color: var(--link); margin-left: auto; text-decoration: none; }
.pp-sh a:hover { text-decoration: underline; }
.pp-sh a::after { content: " \2192"; }
