/* The player card in Floodlit v2 (ct_player_card). The gist of the October 11 card: a portrait object with the pixel avatar, the name, the headline number
   (now the Rating, as a shirt-number plate), six Football DNA dimensions and the rarest achievements.
   Drawn from tokens: sculpted surfaces lit from the top left, the real pitch crop, lime for the one thing to look at.
   The finish (chalk, pitch, floodlight, ink) changes only the frame and the top zone; bands are a prototype guess until the Rating scale is fixed. */

.player-card-box { width: 100%; max-width: 364px; margin-inline: auto; container-type: inline-size; }
.player-card {
  --pc-frame: var(--border-subtle);
  --pc-top: var(--surface-raised);
  --pc-top-image: none;
  width: 360px;
  height: 504px;
  max-width: 100%;
  zoom: min(1, calc(100cqw / 360px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-lg);
  border: 0;
  background: var(--surface-card);
  color: var(--text-strong);
  box-shadow: var(--shadow-card);
}
.player-card[data-card-finish="chalk"] { --pc-frame: var(--border-strong); }
.player-card[data-card-finish="pitch"] { --pc-frame: var(--accent-line); --pc-top: var(--surface-brand); --pc-top-image: url("/assets/pitch/pitch-card-249b3f0a.svg"); }
.player-card[data-card-finish="floodlight"] { --pc-frame: var(--accent); --pc-top: var(--surface-brand); --pc-top-image: url("/assets/pitch/pitch-card-249b3f0a.svg"); box-shadow: var(--glow-accent), var(--shadow-card); }
.player-card[data-card-finish="ink"] { --pc-frame: var(--accent); --pc-top: var(--surface-canvas); --pc-top-image: url("/assets/pitch/pitch-card-249b3f0a.svg"); background: var(--surface-canvas); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.player-card[data-card-finish="ink"] .pc-top-zone::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface-canvas) 72%, transparent); }

.pc-top-zone {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: var(--hero-light), var(--pc-top-image) 50% 50% / cover no-repeat, var(--pc-top);
}
.pc-top-zone > * { position: relative; }
.pc-identity { display: grid; grid-template-columns: var(--player-card-avatar) minmax(0, 1fr); grid-template-rows: var(--player-card-avatar); gap: var(--space-4); }
.pc-avatar { position: relative; width: var(--player-card-avatar); height: var(--player-card-avatar); border-radius: var(--radius-avatar); box-shadow: var(--shadow-key-quiet); }
.pc-avatar .avatar-premium, .pc-avatar .avatar-marked { width: 100%; height: 100%; }
.pc-avatar .avatar { width: 100%; height: 100%; }
.pc-avatar .avatar:not(.avatar--tile) { display: block; }
/* The full name stays on one line; text-fit measures the loaded font and shrinks only when needed. */
.pc-name { font-size: var(--fs-h1); line-height: calc(var(--fs-h1) * 1.05); font-weight: var(--weight-display); letter-spacing: var(--tracking-numeral); text-transform: uppercase; white-space: nowrap; overflow: hidden; font-family: var(--font-display); }
.pc-rating { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; min-height: 0; padding-bottom: var(--player-card-plate-depth); }
.pc-rating__head { display: flex; align-self: stretch; align-items: center; justify-content: flex-end; gap: var(--space-2); min-height: 24px; }
.pc-top { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--surface-inverse); color: var(--text-inverse); font-size: var(--fs-caption); font-weight: var(--weight-bold); gap: var(--space-1); }

.pc-panel { flex: 1; min-height: 0; padding: var(--space-3) var(--space-4) 0; display: flex; flex-direction: column; }
.pc-legend { display: flex; justify-content: space-between; font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--text-muted); }
.pc-legend strong { font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.pc-graph { position: relative; flex: none; width: 308px; height: 188px; margin: var(--space-3) auto; }
.pc-graph::before { content: ""; position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; transform: translate(-50%, -50%); background: radial-gradient(circle closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent); pointer-events: none; }
.pc-graph svg { position: absolute; inset: 0; overflow: visible; }
.pc-ring, .pc-spoke { stroke: var(--border-subtle); stroke-width: 1; }
.pc-ring--outer { fill: var(--surface-canvas); }
.pc-ring--reference { stroke: var(--border-control); stroke-width: 1.5; stroke-dasharray: 3 3; }
.pc-polygon { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.pc-dot { fill: var(--accent); stroke: var(--surface-card); stroke-width: 1.5; }
.pc-axis { position: absolute; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.pc-axis span { font-size: var(--fs-caption); font-weight: var(--weight-bold); letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); line-height: 1; }
.pc-axis b { font-size: var(--fs-num-m); line-height: .9; font-weight: var(--weight-display); font-variant-numeric: tabular-nums; color: var(--text-strong); font-family: var(--font-display); }

.pc-evidence { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-4) var(--space-3); min-width: 0; }
.pc-evidence > .caption { min-width: 0; }
.pc-badges { display: flex; flex: 1; justify-content: flex-end; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pc-badges li { width: 42px; height: 42px; flex: none; }
.pc-badges img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pc-footer { display: flex; align-items: center; gap: 0; padding: var(--space-3) var(--space-4); border-top: 1.5px solid var(--border-faint); font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--text-subtle); background: var(--surface-sunken); }
.pc-footer__logo { display: block; flex: none; width: 56px; height: auto; }
.pc-footer span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.pc-link { display: flex; flex: 1; min-height: 0; border-radius: var(--radius-lg); }
.pc-link .rating-widget { margin: 0; height: 100%; }
.pc-link .pc-plate { height: 100%; line-height: 1; }
.pc-plate[data-tier="top"] { box-shadow: var(--shadow-plate-top); }
.pc-top[data-tier="top"] { background: var(--accent); color: var(--text-on-accent); }
