/* The player card (web/src/render/playerCard.mjs), drawn like a trading card: the art panel in the team's tint
   (--tint, from tintFor) lit from the top left, the crest faded huge behind, the shirt number at the bottom left in
   the hero's light-with-a-dark-stroke treatment so it reads on any tint (Arizona State's gold included), the position
   in a dark pill, a gold seam under it all. Then the name, bio, stars, four stats and the worth. Nothing is cut:
   names and bios wrap. On a mouse it is a hover card placed by script (web/src/ui/cardPlacement.mjs); on touch a
   bottom sheet over a backdrop, the page's gutters either side. */
.pd-card-pop{position:fixed;z-index:75;left:0;top:0;width:300px;max-width:calc(100vw - 16px)}
.pd-card-pop.is-sheet{z-index:91;top:auto;bottom:0;left:max(var(--gutter,14px),calc(50% - 280px));right:max(var(--gutter,14px),calc(50% - 280px));
  width:auto;max-width:none;transition:transform .15s ease-out}
.pd-card-pop.is-sheet.dragging{transition:none}
.pd-sheet-back{position:fixed;inset:0;z-index:90;background:rgba(3,6,4,.66);touch-action:none;overscroll-behavior:none;animation:pd-card-in .15s ease-out}
/* While the sheet is up the page is held still (the script makes it inert too), and the bot check's corner, which a
   pick on this page can raise, goes under the backdrop with the rest of the page until the sheet is closed. */
html.pd-sheet-open{overflow:hidden;overscroll-behavior:none}
html.pd-sheet-open .pick-challenge{z-index:89}
.pd-card.sheet:focus{outline:none}
.pd-card{position:relative;border:1px solid var(--line-3);border-radius:14px;background:var(--f2);color:var(--chalk);
  box-shadow:var(--shadow-3),0 0 0 1px rgba(0,0,0,.35);animation:pd-card-in .12s ease-out}
.pd-card-art{position:relative;isolation:isolate;height:150px;border-radius:13px 13px 0 0;border-bottom:3px solid #ffc247;
  background:radial-gradient(120% 90% at 0% 0%,color-mix(in srgb,var(--tint,#3b4a42) 80%,#fff) 0%,transparent 55%),
    linear-gradient(165deg,var(--tint,#3b4a42) 30%,color-mix(in srgb,var(--tint,#3b4a42) 58%,#070c09) 100%)}
.pd-card-art::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--grain);opacity:.12;mix-blend-mode:overlay;pointer-events:none}
/* Decoration only: the wrapper clips the faded crest to the panel, never any text. */
.pd-card-crest{position:absolute;inset:0;z-index:-1;overflow:hidden;border-radius:inherit}
.pd-card-crest .ghost-crest.home{top:50%;bottom:auto;right:-16%;left:auto;width:auto;height:160%;translate:0 -50%;opacity:.16;filter:grayscale(1) brightness(1.7)}
.pd-card-num{position:absolute;left:14px;bottom:5px;display:block;font-family:var(--display);font-size:112px;font-weight:700;line-height:.82;
  letter-spacing:-1px;font-variant-numeric:tabular-nums;color:var(--chalk);
  -webkit-text-stroke:max(3px,.035em) rgba(7,12,9,.85);paint-order:stroke fill;
  text-shadow:0 0 1px rgba(0,0,0,.85),0 0 3px rgba(0,0,0,.6),0 4px 24px rgba(0,0,0,.35)}
.pd-card-pos{position:absolute;right:12px;bottom:12px;padding:4px 11px 3px;border-radius:var(--r-pill);background:rgba(7,12,9,.78);
  font-family:var(--display);font-size:13px;font-weight:700;line-height:1.2;letter-spacing:2.4px;color:var(--chalk);box-shadow:0 2px 8px rgba(0,0,0,.35)}
.pd-card-body{display:grid;gap:10px;padding:14px 16px 14px}
.pd-card-name{margin:0;font-family:var(--display);font-size:26px;font-weight:700;line-height:1.05;letter-spacing:.6px;text-transform:uppercase;
  color:var(--chalk);overflow-wrap:break-word;text-wrap:balance}
.pd-card-bio{margin:-5px 0 0;font-size:12.5px;line-height:1.4;color:var(--muted);overflow-wrap:break-word}
.pd-card-recruit{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px}
.pd-card-stars{font-size:19px;line-height:1;letter-spacing:1px}
.pd-card-stars .lit{color:#ffc247;text-shadow:0 0 10px rgba(255,194,71,.35)}
.pd-card-stars .unlit{color:#33433a}
.pd-card-unrated{font-family:var(--display);font-size:12px;font-weight:600;letter-spacing:1.8px;text-transform:uppercase;color:var(--muted)}
.pd-card-rank{font-family:var(--display);font-size:11.5px;font-weight:600;letter-spacing:1.8px;text-transform:uppercase;color:var(--chalk-2)}
.pd-card-transfer{padding:3px 10px;border:1px solid color-mix(in srgb,var(--ice) 50%,transparent);border-radius:var(--r-pill);
  background:color-mix(in srgb,var(--ice) 8%,transparent);font-size:12px;line-height:1.3;color:var(--ice)}
.pd-card-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 22px;margin:2px 0 0;padding:12px 0 2px;border-top:1px solid var(--line)}
.pd-card-stat{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0}
.pd-card-stat dt{font-family:var(--display);font-size:11px;font-weight:600;letter-spacing:2px;color:var(--muted)}
.pd-card-stat dd{margin:0;font-family:var(--display);font-size:21px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;color:var(--chalk)}
.pd-card-foot{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px;margin:0;padding-top:10px;
  border-top:1px solid var(--line);font-size:12.5px;color:var(--chalk-2)}
.pd-card-worth{font-family:var(--display);font-size:15px;font-weight:700;letter-spacing:.3px;color:var(--amber)}
.pd-card-worth.neg{color:var(--muted)}
/* The sheet: a grab handle and ✕ over the art (rounded all round, inset in the sheet), the stats in one row of four. */
.pd-card.sheet{border-bottom:0;border-radius:18px 18px 0 0;padding:0 12px calc(10px + env(safe-area-inset-bottom,0px));
  max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;animation:pd-sheet-in .15s ease-out}
.pd-card-grab{position:relative;height:40px;touch-action:none}
.pd-card-handle{position:absolute;left:50%;top:10px;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:var(--line-3)}
.pd-card-close{position:absolute;right:-8px;top:0;width:40px;height:40px;margin:0;padding:0;border:0;border-radius:50%;background:none;
  font-size:16px;line-height:1;color:var(--muted);cursor:pointer}
.pd-card-close:hover,.pd-card-close:focus-visible{color:var(--chalk);background:var(--f3)}
.pd-card.sheet .pd-card-art{height:140px;border-radius:12px;touch-action:none}
.pd-card.sheet .pd-card-num{font-size:104px}
.pd-card.sheet .pd-card-body{padding:14px 4px 4px}
.pd-card.sheet .pd-card-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pd-card.sheet .pd-card-stat{flex-direction:column-reverse;align-items:center;gap:5px}
@keyframes pd-card-in{from{opacity:0}}
@keyframes pd-sheet-in{from{transform:translateY(100%)}}
@media (prefers-reduced-motion:reduce){.pd-card,.pd-card.sheet,.pd-sheet-back{animation:none}.pd-card-pop.is-sheet{transition:none}}
