/* Player mini-card (2026-08-24). Self-contained bottom sheet, same
   ship-as-static-files convention as the feedback and AI-chat widgets.
   z-order: above the chat docks (50/55), below the feedback modal (70). */

.plcard-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 64;
  background: rgba(2, 6, 23, 0.6);
}
.plcard-backdrop.open { display: block; }

.plcard {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
  max-width: 480px; margin: 0 auto;
  background: var(--bg-sunken);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 0.9rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  box-shadow: 0 -10px 30px rgba(2, 6, 23, 0.6);
}
.plcard.open { display: block; }
/* News + outlook made the card taller — the body scrolls, the sheet
   never grows past ~3/4 of the screen. */
.plcard-body { max-height: 72vh; overflow-y: auto; }

.plcard-close {
  position: absolute; top: 0.5rem; right: 0.6rem;
  width: auto; margin: 0; /* bare-<button> width:100% trap on the board */
  background: none; border: none; color: var(--ink-muted);
  font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.4rem;
}
.plcard-close:hover { color: var(--ink); background: none; }

.plcard-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.plcard-avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--line-soft); color: var(--ink-muted); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
}
.plcard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.plcard-id { min-width: 0; }
.plcard-name { font-size: 1rem; font-weight: 800; }
.plcard-name .plcard-inj { color: var(--bad); font-size: 0.7rem; font-weight: 800; }
.plcard-sub { color: var(--ink-muted); font-size: 0.72rem; margin-top: 2px; }
.plcard-sub .plcard-fteam { color: var(--accent-bright); }

.plcard-tiles {
  /* auto-fit rather than a fixed 4: the week-projection tile (2026-09-18)
     makes this 5 wide whenever there's a week number, 4 otherwise, and
     both need to fit a 393px phone without an orphan tile on its own row. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 0.4rem; margin-bottom: 0.7rem;
}
.plcard-tile {
  background: var(--bg-page); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 0.4rem 0.3rem; text-align: center;
}
.plcard-tile .t-label {
  color: var(--ink-muted); font-size: 0.55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.plcard-tile .t-value {
  font-size: 0.95rem; font-weight: 800;
  font-variant-numeric: tabular-nums; margin-top: 1px;
}
.plcard-tile .t-value.pos { color: var(--good); }
.plcard-tile .t-value.neg { color: var(--bad); }

/* The two-numbers summary line (2026-09-18) — printed above the tiles,
   verbatim from app.py's _two_numbers_line so this card and /compare never
   word it two different ways. */
.plcard-twonum {
  font-size: var(--fs-small, 13px); font-weight: 600; color: var(--ink-2);
  margin: 0.35rem 0 0.6rem;
}
.plcard-wk-src {
  display: block; font-size: var(--fs-caption, 11px); font-weight: 600; color: var(--ink-muted);
  text-transform: none; letter-spacing: 0; margin-top: 1px;
}

.plcard-row { color: var(--ink-muted); font-size: 0.72rem; margin: 0.3rem 0; }
.plcard-row b { color: var(--ink); font-weight: 700; }
.plcard-games { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.45rem 0; }
.plcard-chip {
  background: var(--bg-page); border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 0.25rem 0.5rem; font-size: 0.66rem; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.plcard-chip .c-label { color: var(--ink-muted); margin-right: 0.3rem; }
.plcard-note { color: var(--ink-muted); font-size: 0.66rem; margin-top: 0.5rem; }
.plcard-blurb {
  color: var(--ink-2); font-size: 0.76rem; line-height: 1.5;
  background: var(--bg-page); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 0.5rem 0.7rem;
}
.plcard-news { color: var(--ink-muted); font-size: 0.7rem; line-height: 1.45; margin: 0.25rem 0; }
/* 0.7rem, not 0.62: 0.62 rendered 9.92px, well under this app's 11px floor.
   It became worth fixing when the date moved inside a <summary> and turned
   into part of a tap target. */
.plcard-news-date { color: var(--ink-muted); font-size: 0.7rem; white-space: nowrap; }

/* Expandable news (2026-08-29). A headline with a body is a <details>; the
   summary is the whole tap target, sized to the 44px minimum this app holds
   elsewhere (padding does the work -- a headline wraps to 2-3 lines anyway,
   so a min-height would only matter for the rare short one). */
.plcard-news.has-more > summary {
  cursor: pointer; list-style: none; padding: 0.3rem 0 0.3rem 0.85rem;
  position: relative; color: var(--ink-2);
}
.plcard-news.has-more > summary::-webkit-details-marker { display: none; }
/* Own triangle: the native marker sits outside the padding box on iOS and
   cannot be positioned. Rotates when open. */
.plcard-news.has-more > summary::before {
  content: "▸"; position: absolute; left: 0; top: 0.3rem;
  color: var(--accent); font-size: 0.7rem; line-height: 1.45;
  transition: transform 0.15s ease;
}
.plcard-news.has-more[open] > summary::before { transform: rotate(90deg); }
.plcard-news.has-more[open] > summary { color: var(--ink); }
.plcard-news-body {
  color: var(--ink-2); font-size: 0.72rem; line-height: 1.55;
  margin: 0.1rem 0 0.5rem 0.85rem; padding-left: 0.6rem;
  border-left: 2px solid var(--line);
}
@media (prefers-reduced-motion: reduce) {
  .plcard-news.has-more > summary::before { transition: none; }
}
.plcard-loading { color: var(--ink-muted); font-size: 0.8rem; padding: 0.8rem 0; }
.plcard-ask {
  width: auto; margin: 0.6rem 0 0; /* bare-<button> width trap */
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #2e1065; border: 1px solid #5b21b6; color: var(--violet);
  border-radius: 999px; padding: 0.45rem 0.8rem; min-height: 40px;
  font: 700 0.74rem -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
}
.plcard-ask:hover { background: #3b0764; }
.plcard-cmp {
  width: auto; margin: 0.6rem 0 0 0.4rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--bg-accent); border: 1px solid var(--accent-dark); color: var(--accent-bright);
  border-radius: 999px; padding: 0.45rem 0.8rem; min-height: 40px;
  font: 700 0.74rem -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
}
.plcard-cmp:hover { background: #0c2f47; }
.plcard-cmp:disabled { opacity: 0.7; cursor: default; }
