/* ══════════════════════════════════════════════════════════════════════
   HOT BOARDS — player-modal.css  (Phase 1.5)

   Inline-edit modal: click any value to edit it in place.
   No Edit button, no accordion, no Save button.
   Changes auto-save on blur. Each modified field shows a
   small revert (↺) icon that resets to the scraped value.

   Scoped to .pm-* classes.
   ══════════════════════════════════════════════════════════════════════ */


/* ── BACKDROP + MODAL SHELL ─────────────────────────────────────── */
.mbg { padding: 0 !important; align-items: center !important; }

.modal.pm-v2 {
  position: relative;
  width: 92vw;
  height: 92vh;
  max-width: 1400px;
  max-height: 900px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Hide legacy bits we no longer use */
.modal.pm-v2 .mtab.pm-hide { display: none !important; }
.modal.pm-v2 > #tp-bio { display: none !important; }
.modal.pm-v2 > #tp-notes { display: none !important; }


/* ── IDENTITY HEADER ─────────────────────────────────────────────── */
.pm-hdr {
  padding: 16px 22px 12px;
  border-bottom: 0.5px solid var(--b1);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}

/* Jersey number block: inline-editable */
.pm-num-block {
  color: #fff;
  font-family: var(--disp);
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  padding: 10px 16px;
  border-radius: 7px;
  min-width: 86px;
  text-align: center;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  position: relative;
  cursor: text;
  transition: filter 0.12s, outline-color 0.12s;
  outline: 2px solid transparent;
}
.pm-num-block:hover { filter: brightness(1.15); }
.pm-num-block.pm-editing {
  outline-color: rgba(93,173,226,0.55);
  filter: brightness(1.2);
}
.pm-num-block.pm-modified {
  outline-color: rgba(241,196,15,0.6);
}
.pm-num-input {
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  width: 70px;
  text-align: center;
  outline: none;
}
.pm-num-revert {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--s1);
  color: #f5d76e;
  border: 1px solid rgba(241,196,15,0.5);
  font-size: 10px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-family: var(--body);
  font-weight: normal;
}
.pm-num-revert:hover {
  background: rgba(241,196,15,0.18);
}
.pm-num-block.pm-modified .pm-num-revert { display: flex; }


.pm-hinfo { flex: 1; min-width: 0; }
.pm-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 5px;
}
.pm-name {
  color: var(--t1);
  font-family: var(--disp);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* Status badge -- click to open dropdown */
.pm-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  font-family: var(--disp);
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.1s;
}
.pm-status-badge::after {
  content: '\25BE';
  font-size: 7px;
  opacity: 0.6;
  margin-left: 2px;
}
.pm-status-badge:hover { filter: brightness(1.15); }
/* 3-bucket scheme: green = active, red = ALL injury/reserve, grey = practice squad. */
.pm-status-badge.pm-st-active { background: rgba(40,184,112,.15); color: #58d68d; }
.pm-status-badge.pm-st-q,
.pm-status-badge.pm-st-d,
.pm-status-badge.pm-st-out,
.pm-status-badge.pm-st-ir,
.pm-status-badge.pm-st-pup,
.pm-status-badge.pm-st-nfi,
.pm-status-badge.pm-st-susp { background: rgba(232,52,26,.15); color: #e87060; }
.pm-status-badge.pm-st-ps   { background: rgba(107,114,128,.15); color: #9aa3b0; }
.pm-status-badge.pm-st-scratch { background: rgba(226,184,94,.16); color: #e2b85e; }
.pm-status-badge.pm-st-dnp  { background: rgba(100,100,120,.1); color: var(--t3); }

/* Status dropdown menu */
.pm-status-menu {
  position: absolute;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: 5px;
  padding: 3px;
  display: none;
  z-index: 1000;
  min-width: 150px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.pm-status-menu.pm-on { display: block; }
.pm-status-menu-item {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--t2);
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.03em;
  font-family: var(--body);
}
.pm-status-menu-item:hover { background: var(--s3); color: var(--t1); }


/* Phonetic line -- TWO fields, First + Last */
.pm-phon-line {
  color: var(--t3);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.01em;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pm-phon-part {
  cursor: text;
  padding: 2px 5px;
  margin: -2px -5px;
  border-radius: 3px;
  transition: background 0.12s;
  display: inline-block;
  font-style: italic;
  color: var(--t3);
  position: relative;
}
.pm-phon-part:hover { background: rgba(93,173,226,0.07); color: var(--t2); }
.pm-phon-part.pm-editing { background: rgba(93,173,226,0.12); outline: 1.5px solid rgba(93,173,226,0.45); }
.pm-phon-part.pm-empty {
  color: var(--t4);
  font-style: italic;
  opacity: 0.6;
}
.pm-phon-part.pm-empty:hover { opacity: 1; }
.pm-phon-part.pm-modified {
  color: #f5d76e;
  font-style: normal;
  font-weight: 500;
}
.pm-phon-part.pm-modified::after {
  content: '\21BA';
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.7;
  color: #f5d76e;
  cursor: pointer;
  font-style: normal;
}
.pm-phon-part.pm-modified:hover::after { opacity: 1; }
.pm-phon-part-input {
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: italic;
  padding: 0;
  outline: none;
  width: 110px;
}
.pm-phon-sep { color: var(--t4); font-style: normal; padding: 0 2px; }


/* ── FACTS GRID (6 cols, inline-editable) ────────────────────────── */
.pm-fact {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  min-width: 0;
}
.pm-fact-k {
  color: var(--t4);
  letter-spacing: 0.04em;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--disp);
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 44px;
}
.pm-fact-v {
  color: var(--t1);
  font-weight: 600;
  cursor: text;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 3px;
  transition: background 0.12s, color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-fact-v:hover { background: rgba(93,173,226,0.08); }
.pm-fact-v.pm-editing {
  background: rgba(93,173,226,0.12);
  outline: 1.5px solid rgba(93,173,226,0.45);
}
.pm-fact-v.pm-modified { color: #f5d76e; }
.pm-fact-v.pm-empty {
  color: var(--t4);
  font-style: italic;
  font-weight: 400;
}
.pm-fact-v.pm-readonly { cursor: default; }
.pm-fact-v.pm-readonly:hover { background: transparent; }

.pm-fact-input {
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  outline: none;
  width: 100%;
  min-width: 40px;
}
.pm-fact-v.pm-editing .pm-fact-input { color: #85b7eb; }
.pm-fact-v.pm-modified.pm-editing .pm-fact-input { color: #f5d76e; }

.pm-revert-btn {
  color: #f5d76e;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  line-height: 1;
  padding: 0 2px;
  border-radius: 2px;
  font-family: var(--body);
  font-weight: normal;
  flex-shrink: 0;
}
.pm-fact-v.pm-modified .pm-revert-btn { opacity: 0.75; }
.pm-revert-btn:hover {
  opacity: 1 !important;
  background: rgba(241,196,15,0.15);
}


/* ── MONEY / INJURY ROWS (inline-editable) ──────────────────────── */
.pm-money {
  padding: 10px 22px 8px;
  border-bottom: 0.5px solid var(--b1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex-shrink: 0;
}
.pm-mrow {
  display: grid;
  grid-template-columns: 64px 1fr 1.1fr;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  min-width: 0;
}
.pm-mrow-lbl {
  color: var(--t4);
  letter-spacing: 0.04em;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--disp);
  text-transform: uppercase;
}

/* Scraped side (read-only) */
.pm-mrow-scraped {
  font-family: var(--disp);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-mrow-scraped.pm-scr-contract {
  color: var(--green);
  background: rgba(40,184,112,.08);
  border: 1px solid rgba(40,184,112,.18);
}
.pm-mrow-scraped.pm-scr-injury-q {
  color: var(--orange);
  background: rgba(240,120,48,.08);
  border: 1px solid rgba(240,120,48,.25);
  border-left: 2px solid var(--orange);
}
.pm-mrow-scraped.pm-scr-injury-out {
  color: #e85040;
  background: rgba(232,52,26,.1);
  border: 1px solid rgba(232,52,26,.25);
  border-left: 2px solid #e85040;
}
.pm-mrow-scraped.pm-scr-none {
  color: var(--t4);
  font-style: italic;
  background: transparent;
  border: 1px dashed var(--b2);
  font-weight: 400;
}

/* Override side (inline-editable) */
.pm-mrow-ovr {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 3px;
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.12);
  color: var(--t4);
  cursor: text;
  display: flex;
  align-items: center;
  gap: 6px;
  font-style: italic;
  transition: background 0.12s, border-color 0.12s;
  min-width: 0;
}
[data-theme="light"] .pm-mrow-ovr { border-color: rgba(0,0,0,0.12); }
.pm-mrow-ovr:hover {
  background: rgba(93,173,226,0.05);
  border-color: rgba(93,173,226,0.3);
  border-style: solid;
  color: var(--t2);
}
.pm-mrow-ovr.pm-editing {
  background: rgba(93,173,226,0.08);
  border: 1.5px solid rgba(93,173,226,0.5);
}
.pm-mrow-ovr.pm-modified {
  background: rgba(241,196,15,.08);
  border: 1px solid rgba(241,196,15,.3);
  color: #f5d76e;
  font-style: normal;
}
.pm-mrow-ovr-val {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-mrow-ovr-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f5d76e;
  font-size: 11.5px;
  font-family: var(--body);
  padding: 0;
  outline: none;
  min-width: 0;
}
.pm-mrow-ovr.pm-editing .pm-mrow-ovr-input { color: #85b7eb; }

.pm-ovr-lbl {
  font-size: 8px;
  letter-spacing: 0.1em;
  font-weight: 800;
  font-family: var(--disp);
  color: var(--t4);
  flex-shrink: 0;
}
.pm-mrow-ovr.pm-modified .pm-ovr-lbl { color: rgba(241,196,15,0.7); }


/* ── INJURY EXPAND PANEL (Wed/Thu/Fri inline) ────────────────────── */
.pm-inj-expand {
  padding: 10px 22px 12px;
  border-bottom: 0.5px solid var(--b1);
  background: rgba(240,120,48,0.04);
  display: none;
  flex-shrink: 0;
}
.pm-inj-expand.pm-on { display: block; }
.pm-inj-expand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.pm-inj-ef { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-inj-ef label {
  font-size: 8.5px;
  color: rgba(240,120,48,0.7);
  letter-spacing: 0.08em;
  font-weight: 800;
  font-family: var(--disp);
  text-transform: uppercase;
}
.pm-inj-ef-val {
  font-size: 12px;
  color: var(--t1);
  padding: 4px 8px;
  border: 1px dashed var(--b2);
  border-radius: 3px;
  cursor: text;
  transition: border-color 0.12s, background 0.12s;
  min-height: 14px;
  font-family: var(--body);
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-inj-ef-val:hover {
  border-color: rgba(93,173,226,0.35);
  background: rgba(93,173,226,0.04);
}
.pm-inj-ef-val.pm-editing {
  background: rgba(93,173,226,0.08);
  border: 1.5px solid rgba(93,173,226,0.5);
}
.pm-inj-ef-val.pm-empty::before {
  content: '\2014';
  color: var(--t4);
}
.pm-inj-ef-val.pm-modified {
  background: rgba(241,196,15,.08);
  border: 1px solid rgba(241,196,15,.3);
  color: #f5d76e;
}
.pm-inj-ef-input {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  outline: none;
}


/* ── TOAST (save confirmation) ───────────────────────────────────── */
.pm-toast {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40,184,112,0.95);
  color: white;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 50;
  font-family: var(--disp);
}
.pm-toast.pm-on { opacity: 1; }


/* ── DELETE BUTTON (manual players only) ─────────────────────────── */
.pm-del-btn {
  background: transparent;
  border: 1px dashed rgba(232,112,96,.4);
  color: #e87060;
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--disp);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.pm-del-btn:hover { background: rgba(232,112,96,.08); }
.pm-del-btn.pm-hide { display: none; }


/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .modal.pm-v2 { width: 98vw; height: 96vh; }
  .pm-money { grid-template-columns: 1fr; gap: 10px; }
  .pm-inj-expand-grid { grid-template-columns: 1fr 1fr 1fr; }
}


/* ══════════════════════════════════════════════════════════════════════
   PHASE 2 -- STATS TAB
   Three blocks (Last Game / Season / Career), each with editable stat
   line + auto-grow notes textarea. Talking Points always visible.
   ══════════════════════════════════════════════════════════════════════ */

.pm-stats-pane { padding: 16px 24px 26px; }

.pm-stats-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 12px;
  border-bottom: 0.5px solid var(--b1);
  margin-bottom: 20px;
  font-size: 11px;
  color: var(--t4);
  letter-spacing: 0.01em;
}
.pm-stats-hint a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--disp);
  letter-spacing: 0.04em;
  margin-left: 14px;
}
.pm-stats-hint a:hover { text-decoration: underline; }
.pm-ssn-badge {
  background: rgba(40,184,112,.1);
  color: var(--green);
  font-family: var(--disp);
  font-weight: 800;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

/* Stat block */
.pm-sb { margin-bottom: 24px; }

.pm-sb-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 9px;
  cursor: pointer;
  user-select: none;
  border-radius: 3px;
  margin: 0 -6px;
  transition: background 0.12s;
}
.pm-sb-hdr:hover { background: rgba(255,255,255,0.025); }
[data-theme="light"] .pm-sb-hdr:hover { background: rgba(0,0,0,0.03); }

.pm-sb-bar {
  width: 3px;
  height: 14px;
  border-radius: 1px;
  flex-shrink: 0;
}
.pm-sb-lg .pm-sb-bar  { background: var(--red); }
.pm-sb-ssn .pm-sb-bar { background: var(--blue); }
.pm-sb-car .pm-sb-bar { background: #d4a574; }

.pm-sb-k {
  color: var(--t1);
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--disp);
  text-transform: uppercase;
}
.pm-sb-caret {
  font-size: 8px;
  color: var(--t4);
  transition: transform 0.18s ease, color 0.12s;
  display: inline-block;
}
.pm-sb.pm-sb-expanded .pm-sb-caret {
  transform: rotate(90deg);
  color: var(--t1);
}
.pm-sb-hdr:hover .pm-sb-caret { color: var(--t1); }

.pm-sb-meta {
  color: var(--t3);
  font-size: 10px;
  font-style: italic;
  margin-left: auto;
  opacity: 0.85;
}

.pm-sb-notes-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  display: none;
  margin-left: 6px;
  box-shadow: 0 0 5px rgba(40,184,112,0.5);
}
.pm-sb.pm-sb-has-notes:not(.pm-sb-expanded) .pm-sb-notes-dot {
  display: inline-block;
}

.pm-sb-divider {
  height: 1px;
  background: var(--b1);
  margin-bottom: 13px;
}

/* Stat row (label + editable value) */
.pm-sr {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 5px;
}
.pm-sr-lbl {
  color: var(--t3);
  letter-spacing: 0.1em;
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--disp);
  text-transform: uppercase;
}
.pm-sr-val {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 9.5px;
  color: var(--t1);
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: text;
  letter-spacing: 0.015em;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  min-height: 18px;
  outline: none;
  white-space: nowrap;
  overflow-x: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-sr-val:hover {
  background: rgba(93,173,226,0.08);
  border-color: rgba(93,173,226,0.2);
}
.pm-sr-val:focus {
  background: rgba(93,173,226,0.1);
  border: 1.5px solid rgba(93,173,226,0.55);
}
.pm-sr-val.pm-sr-modified {
  background: rgba(241,196,15,0.07);
  border: 1px solid rgba(241,196,15,0.3);
  color: #f5d76e;
}
.pm-sr-val.pm-sr-modified:hover {
  background: rgba(241,196,15,0.11);
  border-color: rgba(241,196,15,0.5);
}
.pm-sr-val.pm-sr-empty {
  color: var(--t3);
  font-style: italic;
  font-family: var(--body);
  opacity: 0.7;
}
.pm-sr-val.pm-sr-empty:not(:focus)::after {
  content: 'blank \2014 hidden from print card';
  color: var(--t3);
  opacity: 0.6;
}
.pm-sr-revert {
  color: #f5d76e;
  font-size: 11px;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
  font-family: var(--body);
  flex-shrink: 0;
  margin-left: auto;
  font-weight: normal;
}
.pm-sr-val.pm-sr-modified .pm-sr-revert { opacity: 0.7; }
.pm-sr-revert:hover {
  opacity: 1 !important;
  background: rgba(241,196,15,0.18);
}

/* ----- Print preview modal ----- */
.pm-print-preview-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pm-print-preview-bg.on { display: flex; }
.pm-print-preview-wrap {
  background: #1a1a1a;
  border-radius: 6px;
  padding: 16px;
  max-width: 94vw;
  max-height: 92vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.pm-print-preview-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.pm-print-preview-toolbar .pm-pp-title {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: auto;
}
.pm-print-preview-toolbar button {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  border: 0.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-family: inherit;
}
.pm-print-preview-toolbar button.primary {
  background: #f39c12;
  color: #1a1000;
  border-color: #f39c12;
}
.pm-print-preview-card {
  background: #fff;
  color: #000;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: 'Oswald', sans-serif;
  display: flex;
  gap: 14px;
  font-size: 13px;
  width: 560px;
  max-width: 100%;
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
.pm-pp-n {
  background: #002244;
  color: #A5ACAF;
  font-weight: 500;
  font-size: 32px;
  padding: 6px 12px;
  border-radius: 4px;
  min-width: 54px;
  text-align: center;
  line-height: 1;
  font-family: 'Oswald', sans-serif;
  flex-shrink: 0;
}
.pm-pp-pos {
  font-size: 10px;
  font-weight: 700;
  color: #000;
  margin-top: 3px;
  text-align: center;
  letter-spacing: 0.06em;
}
.pm-pp-body { flex: 1; min-width: 0; }
.pm-pp-nm {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}
.pm-pp-bio {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #444;
  margin-bottom: 6px;
  font-weight: 500;
}
.pm-pp-bio-l { min-width: 0; }
.pm-pp-acq { color: #c0392b; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.pm-pp-ln {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 0;
  border-top: 1px dashed #ccc;
  line-height: 1.4;
}
.pm-pp-ln:first-of-type { border-top: none; }
.pm-pp-k {
  font-size: 9px;
  font-weight: 800;
  color: #c0392b;
  margin-right: 5px;
  letter-spacing: 0.06em;
}
.pm-pp-inj { color: #c0392b; font-weight: 600; }
.pm-pp-contract { display: flex; align-items: baseline; }
.pm-pp-money {
  margin-left: auto;
  color: #0f6e56;
  font-weight: 700;
  text-align: right;
}
.pm-pp-indent { display: inline-block; padding-left: 14px; }
.pm-pp-tp.pm-pp-indent { display: block; padding-left: 14px; }
.pm-pp-sub-lbl { font-weight: 700; }
.pm-pp-rule { border-top: 1px solid rgba(0,0,0,.35); margin: 5px 0; }

/* Advanced — header with stats stacked underneath */
.pm-pp-adv {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed #ccc;
}
.pm-pp-adv-h {
  font-size: 9px;
  font-weight: 800;
  color: #c0392b;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.pm-pp-adv-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  padding-left: 14px;
}
.pm-pp-adv-lbl { color: #444; }
.pm-pp-adv-val { font-weight: 700; flex-shrink: 0; text-align: right; }
.pm-pp-tp {
  color: #c0392b;
  font-style: italic;
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.45;
  border-top: 1px dashed #ccc;
  padding-top: 4px;
}
.pm-pp-ht {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  line-height: 1.3;
  color: #000;
}

/* Toolbar mode tabs (board card vs study sheet) */
.pm-pp-tabs { display: inline-flex; gap: 4px; margin-right: auto; }
.pm-print-preview-toolbar .pm-pp-title { margin-right: 12px; }
.pm-print-preview-toolbar .pm-pp-tab.on {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

/* ── STUDY SHEET (full per-player research dump) ── */
.pm-ss-page {
  background: #fff; color: #111;
  width: 760px; max-width: 100%;
  padding: 26px 30px;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
  font-family: 'Oswald', sans-serif;
}
.pm-ss-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 14px; }
.pm-ss-num {
  background: #002244; color: #fff; font-weight: 600; font-size: 30px;
  min-width: 56px; text-align: center; padding: 8px 10px; border-radius: 4px; line-height: 1;
}
.pm-ss-name { font-size: 24px; font-weight: 400; letter-spacing: .01em; }
.pm-ss-name b { font-weight: 700; }
.pm-ss-sub { font-size: 12px; color: #555; font-weight: 500; margin-top: 3px; }
.pm-ss-sec { margin-bottom: 12px; break-inside: avoid; }
.pm-ss-seclbl {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #c0392b; border-bottom: 1px solid #ddd; padding-bottom: 3px; margin-bottom: 5px;
}
.pm-ss-secbody { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 24px; }
.pm-ss-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 2px 0; border-bottom: 1px dotted #e4e4e4; }
.pm-ss-k { font-weight: 700; color: #333; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding-top: 1px; }
.pm-ss-v { font-weight: 600; color: #111; text-align: right; }
.pm-ss-notes-sec .pm-ss-note { margin-bottom: 6px; break-inside: avoid; }
.pm-ss-note-lbl { font-size: 9px; font-weight: 800; color: #c0392b; letter-spacing: .06em; text-transform: uppercase; }
.pm-ss-note-txt { font-size: 12px; color: #111; line-height: 1.5; font-style: italic; }
/* Last 3 Games weekly box on the study sheet (spans both grid columns). */
.pm-ss-l3 { grid-column: 1 / -1; width: 100%; border-collapse: collapse; font-size: 11px; }
.pm-ss-l3 th { font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #555; text-align: right; padding: 2px 6px; border-bottom: 1px solid #ccc; }
.pm-ss-l3 th:first-child, .pm-ss-l3 td:first-child { text-align: left; font-weight: 700; }
.pm-ss-l3 td { text-align: right; padding: 2px 6px; color: #111; border-bottom: 1px dotted #e4e4e4; }
/* Cross-system IDs footer (study sheet). */
.pm-ss-ids { margin-top: 10px; padding-top: 6px; border-top: 1px solid #ddd; font-family: ui-monospace, monospace; font-size: 9px; color: #888; letter-spacing: .03em; }

@media print {
  .pm-print-preview-bg { background: white !important; padding: 0 !important; }
  .pm-print-preview-wrap { background: white !important; box-shadow: none !important; padding: 0 !important; }
  .pm-print-preview-toolbar { display: none !important; }
  .pm-print-preview-card { box-shadow: none !important; border: 1px solid #000 !important; }
  /* Study sheet: ink-friendly B&W, portrait letter, page-break aware */
  .pm-pp-mode-study .pm-ss-page {
    box-shadow: none !important; width: 100% !important; padding: 0 !important;
    color: #000 !important;
  }
  .pm-pp-mode-study .pm-ss-num { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pm-pp-mode-study .pm-ss-seclbl,
  .pm-pp-mode-study .pm-ss-note-lbl { color: #000 !important; }
  .pm-pp-mode-study .pm-ss-l3 th,
  .pm-pp-mode-study .pm-ss-l3 td { color: #000 !important; }
  .pm-pp-mode-study .pm-ss-ids { color: #000 !important; }
  @page { size: letter portrait; margin: 0.5in; }
}

/* ══════════════════════════════════════════════════════════════════════
   PLAYER MODAL — v26 "Carbon & Brass" rebuild (pmx-*)
   Faithful port of design_handoff_hotboards/screens/player-modal.html
   Type:  serif = name + number only · sans = labels/values · mono = numbers
   ══════════════════════════════════════════════════════════════════════ */

/* missing-token shims (mockup references these names) */
.modal.pmx { --radius-xl: var(--r-xl); --glow-heat: 0 0 0 4px rgba(182,138,78,.12), 0 6px 18px rgba(182,138,78,.18); }

/* ── BACKDROP ── */
#mbg:has(.modal.pmx) {
  padding: 26px !important;
  align-items: flex-start !important;
  justify-content: center !important;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(182,138,78,.05), transparent),
    rgba(4,9,16,.74);
  overflow: auto;
}

/* ── SHELL ── */
.modal.pmx {
  position: relative;
  width: min(1180px, 97vw);
  max-width: 97vw;
  height: auto;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--surface-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

/* Row beneath the full-width toolbar: editor (left) + print board (right) */
.modal.pmx .pmx-body {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

/* ── TWO-PANEL: editor (left) + live board card (right) ── */
.modal.pmx .pmx-main {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}
.modal.pmx .pmx-dock {
  flex: 0 0 34%;
  width: auto;
  min-width: 300px;
  max-width: 460px;
  align-self: stretch;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(182,138,78,.05), transparent 120px),
    var(--surface-raised);
  border-left: 1px solid var(--border-strong);
}
.pmx-dock-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 6px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-strong);
  border-bottom: 1px solid var(--border-hair);
  background: var(--surface-raised);
}
.pmx-dock-sub {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: .04em;
  text-transform: none;
}
/* When the print-board panel is too narrow to show the title, the helper line,
   AND the three action buttons on one row, drop the (non-essential) helper line
   so STATS / UNDO / HELP stay on a single, uncramped row. */
@container (max-width: 460px) {
  .pmx-dock-sub { display: none; }
  .pmx-dock-head { gap: 6px; }
  .pmx-dock-head .pmx-bn-undo { padding: 0 8px; }
}
/* Extreme floor (heavy browser zoom): even without the helper line the three
   labeled buttons can't share one row, so collapse them to icon-only. The text
   stays in the accessibility tree (font-size:0, not display:none) and each
   button keeps its title tooltip, so the controls remain labeled for AT. */
@container (max-width: 375px) {
  .pmx-dock-head .pmx-bn-undo { font-size: 0; gap: 0; }
  .pmx-dock-head .pmx-bn-undo svg { width: 14px; height: 14px; }
}
.pmx-bn-undo {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; border-radius: var(--radius-sm);
  background: var(--surface-input); border: 1px solid var(--border-strong);
  color: var(--text-secondary); cursor: pointer;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  transition: border-color .12s, color .12s, background .12s, opacity .12s;
}
.pmx-bn-undo:hover:not(:disabled) { border-color: var(--heat-600); color: var(--heat-300); background: var(--heat-wash); }
.pmx-bn-undo:disabled { opacity: .4; cursor: default; }
.pmx-bn-stats { margin-left: auto; }
.pmx-bn-stats:hover { border-color: var(--heat-600); color: var(--heat-300); background: var(--heat-wash); }
.pmx-dock-head .pmx-bn-undo:not(.pmx-bn-stats) { margin-left: 0; }

/* ── Stats Card (board-stat picker) ── */
.pmx-statscard { position: absolute; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; }
.pmx-statscard.pm-on { display: flex; }
.pmx-sc-scrim { position: absolute; inset: 0; background: rgba(6,8,11,.62); backdrop-filter: blur(2px); }
.pmx-sc-panel {
  position: relative; z-index: 1;
  width: 440px; max-width: calc(100% - 36px); max-height: 80%;
  display: flex; flex-direction: column;
  background: var(--surface-raised, #14171c); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md, 10px); box-shadow: 0 18px 50px rgba(0,0,0,.55);
  animation: pmScIn .14s ease-out;
}
@keyframes pmScIn { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }
.pmx-sc-head { flex: 0 0 auto; display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 10px; }
.pmx-sc-title { font-family: var(--font-sans); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-strong); }
.pmx-sc-sub { font-family: var(--font-sans); font-size: 11px; color: var(--text-faint); }
.pmx-sc-x { margin-left: auto; flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text-faint); font-size: 20px; line-height: 1; cursor: pointer; border-radius: 6px; }
.pmx-sc-x:hover { color: var(--text-strong); background: var(--surface-input); }
.pmx-sc-searchwrap { flex: 0 0 auto; padding: 0 16px 10px; }
.pmx-sc-search { width: 100%; height: 34px; padding: 0 11px; box-sizing: border-box; background: var(--surface-input); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-strong); font-family: var(--font-sans); font-size: 13px; outline: none; }
.pmx-sc-search:focus { border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.pmx-sc-search::placeholder { color: var(--text-faint); }
.pmx-sc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 10px 8px; }
.pmx-sc-grp { position: sticky; top: 0; z-index: 1; padding: 9px 6px 4px; font-family: var(--font-sans); font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); background: var(--surface-raised, #14171c); }
.pmx-sc-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 6px; border: none; background: transparent; cursor: pointer; border-radius: var(--radius-sm); text-align: left; font-family: var(--font-sans); font-size: 12.5px; color: var(--text-secondary); transition: background .1s, color .1s; }
.pmx-sc-row.pmx-sc-sub { padding-left: 30px; font-size: 11.5px; }
.pmx-sc-row:hover { background: var(--surface-input); color: var(--text-strong); }
.pmx-sc-check { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--surface-input); position: relative; transition: background .1s, border-color .1s; }
.pmx-sc-row.is-on .pmx-sc-check { background: var(--heat-500, var(--accent)); border-color: var(--heat-500, var(--accent)); }
.pmx-sc-row.is-on .pmx-sc-check::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pmx-sc-row.is-on .pmx-sc-lbl { color: var(--text-strong); }
.pmx-sc-lbl { flex: 1 1 auto; min-width: 0; }
.pmx-sc-empty { padding: 24px 12px; text-align: center; color: var(--text-faint); font-family: var(--font-sans); font-size: 12.5px; font-style: italic; }
.pmx-sc-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border-hair); }
.pmx-sc-posbtn { flex: 1 1 auto; justify-content: center; }
.pmx-sc-done { flex: 0 0 auto; }
/* custom-stat add form + deletable custom rows */
.pmx-sc-add { display: flex; gap: 6px; padding: 4px 6px 8px; }
.pmx-sc-addin { flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 9px; box-sizing: border-box; background: var(--surface-input); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-strong); font-family: var(--font-sans); font-size: 12.5px; outline: none; }
.pmx-sc-addval { flex: 0 0 86px; }
.pmx-sc-addin:focus { border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.pmx-sc-addin::placeholder { color: var(--text-faint); }
.pmx-sc-addbtn { flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--heat-600); background: var(--heat-wash); color: var(--heat-300); font-family: var(--font-sans); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.pmx-sc-addbtn:hover { filter: brightness(1.12); }
.pmx-sc-customrow { display: flex; align-items: center; }
.pmx-sc-customrow .pmx-sc-row { flex: 1 1 auto; }
.pmx-sc-del { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text-faint); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 6px; }
.pmx-sc-del:hover { color: var(--status-out); background: var(--surface-input); }

/* Color + symbol legend above the notes box — two columns: colors | symbols. */
.pmx-bn-legend {
  flex: 0 0 auto;
  display: flex; align-items: flex-start; gap: 22px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-hair);
  background: var(--surface-raised);
}
.pmx-bn-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pmx-bn-col-sym { flex: 1.15 1 0; border-left: 1px solid var(--border-hair); padding-left: 22px; }
.pmx-bn-leg-lbl {
  font-family: var(--font-sans); font-size: 9.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
}
.pmx-bn-colors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pmx-bn-clr {
  display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px;
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  transition: border-color .12s, background .12s;
}
.pmx-bn-clr:hover { background: var(--surface-hover); }
.pmx-bn-clr-red { color: #DE5B41; }
.pmx-bn-clr-grn { color: #58C08C; }
.pmx-bn-clr-blu { color: #5B9BE0; }
.pmx-bn-clr-nrm { color: var(--text-secondary); }
.pmx-bn-clr-red:hover { border-color: #DE5B41; }
.pmx-bn-clr-grn:hover { border-color: #58C08C; }
.pmx-bn-clr-blu:hover { border-color: #5B9BE0; }
/* Symbol cheat-sheet: two even rows of three uniform chips that visually rhyme
   with the color buttons — faint typed shortcut on the left, the resulting glyph
   on the right. Reference only (the glyphs are produced by typing the shortcut). */
.pmx-bn-glyphs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pmx-bn-gk {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 22px; padding: 0 9px; min-width: 0;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.pmx-bn-gk kbd {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; line-height: 1;
  color: var(--text-faint); background: transparent; border: 0; border-radius: 0; padding: 0;
  letter-spacing: .02em;
}
.pmx-bn-gk i { font-style: normal; font-size: 13px; line-height: 1; color: var(--text-strong); }
.pmx-dock-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  align-items: stretch;
}
/* The print board: one editable, FORMATTED notes box (contenteditable) so it can
   render colored labels (red injury, green salary) + icons — what a plain
   <textarea> can't. Styled to match the modal's input fields (dark surface);
   auto-seeds from the toggled fields, fully editable. */
.pmx-board-notes {
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 540px;
  background: var(--surface-input);
  color: var(--text-body);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .005em;
  outline: none;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  tab-size: 4;
}
.pmx-board-notes:focus { box-shadow: var(--ring-focus); border-color: var(--border-focus); }
.pmx-board-notes:empty:before {
  content: attr(data-ph); color: var(--text-faint); font-style: italic;
}
/* one field per line: inline "label value", everything in the same font so the
   board reads as one consistent block. The label is just a short word + colon
   (or a colored marker for injury / salary). */
.pmx-board-notes .pbl-blk { display: block; }
.pmx-board-notes .pbl { display: block; }
.pmx-board-notes .pbl-lbl { font-weight: 700; color: var(--text-muted); }
.pmx-board-notes .pbl-note { color: var(--text-secondary); font-style: italic; }
/* secondary stat category (e.g. a QB's rushing) stacked under the primary */
.pmx-board-notes .pbl-sub { padding-left: 30px; }
.pmx-board-notes .pbl-sub-lbl { font-weight: 700; color: var(--text-muted); }
/* rule line separating the stat blocks from the NGS section */
.pmx-board-notes .pbl-rule {
  border-top: 1px solid var(--border-strong, rgba(255,255,255,.22));
  margin: 6px 0;
}
.pmx-board-notes .pbl-inj { color: var(--status-out, #e23b3b); font-weight: 700; }
.pmx-board-notes .pbl-sal { color: var(--green, #1F9A60); font-weight: 700; }
/* whole-line injury (red) + salary (green) rows */
.pmx-board-notes .pbl-inj-line { color: var(--status-out, #e23b3b); font-weight: 700; }
.pmx-board-notes .pbl-sal-line { color: var(--green, #1F9A60); font-weight: 700; }
/* manual "Healthy Scratch" tag -- amber, distinct from injury(red)/salary(green) */
.pmx-board-notes .pbl-scratch { color: #e0a44d; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
/* section header (NGS / ADV / L3) + its bulleted sub-lines */
.pmx-board-notes .pbl-head { font-weight: 700; color: var(--text-muted); margin-top: 4px; }
.pmx-board-notes .pbl-bullet { padding-left: 14px; text-indent: -8px; }
.pmx-board-notes .pbl-bullet:before { content: "\2022"; color: var(--text-faint); margin-right: 6px; }
/* ADVANCED bullets flow into two balanced columns to save vertical space. */
.pmx-board-notes .pbl-cols { column-count: 2; column-gap: 22px; }
.pmx-board-notes .pbl-cols .pbl-bullet { break-inside: avoid; -webkit-column-break-inside: avoid; }
/* NGS rank parenthetical: extra space off the value, colored by tier */
.pmx-board-notes .pbl-ngs-rank { margin-left: 10px; font-weight: 700; }
.pmx-board-notes .pbl-ngs-hi { color: var(--green, #1F9A60); }
.pmx-board-notes .pbl-ngs-lo { color: var(--status-out, #e23b3b); }
.pmx-board-notes .pbl-tp { margin-top: 10px; color: var(--text-body); }

/* shared type helpers inside the modal */
.modal.pmx .pmx-lbl {
  font-family: var(--font-sans); font-weight: 600; font-size: 10px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint);
}
.modal.pmx .pmx-seclbl {
  font-family: var(--font-sans); font-weight: 600; font-size: 10px;
  letter-spacing: .13em; text-transform: uppercase; color: #837e74;
  white-space: nowrap;
}

.modal.pmx .pm-hide { display: none !important; }

/* ── TOOLBAR ── */
.pmx-bar {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 16px;
  border-bottom: 1px solid var(--border-hair);
  background: var(--surface-raised);
}
.pmx-bar-accent {
  position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: var(--accent-grad);
}
.pmx-save {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); white-space: nowrap;
}
.pmx-save-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint); flex: 0 0 auto;
}
.pmx-save.saved { color: var(--grn-400); }
.pmx-save.saved .pmx-save-dot { background: var(--grn-400); }
.pmx-bar-spacer { flex: 1; }
.pmx-srcs { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pmx-srcs #pmSourcesLinks {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.pmx-srcs #pmSourcesLinks a {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-sans); font-weight: 700; font-size: 10px;
  letter-spacing: .06em; color: var(--heat-300);
  text-decoration: underline; text-decoration-color: rgba(230,200,146,.4);
  text-underline-offset: 2px; white-space: nowrap; cursor: pointer;
  transition: color .12s, text-decoration-color .12s;
}
.pmx-srcs #pmSourcesLinks a:hover {
  color: var(--heat-200); text-decoration-color: var(--heat-300);
}
.pmx-srcs #pmSourcesLinks .pm-src-dot {
  color: var(--border-strong); margin: 0 -6px; font-size: 9px;
}
.pmx-bar-div { width: 1px; height: 18px; background: var(--border-strong); margin: 0 2px; flex: 0 0 auto; }
.pmx-prev-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--heat-600); background: var(--heat-wash); color: var(--heat-300);
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
  transition: background .12s, color .12s;
}
.pmx-prev-btn:hover { background: rgba(182,138,78,.22); color: var(--heat-300); }

/* Simple-by-default master switch: a subtle ghost toggle that reveals the
   per-field print icons only when the user opts in. */
.pmx-cust-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-faint);
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.pmx-cust-btn:hover { color: var(--text-strong); border-color: var(--text-faint); }
.pmx-cust-btn.on {
  border-color: var(--heat-600); background: var(--heat-wash); color: var(--heat-300);
}
/* Per-field print toggles are always visible (matching the approved design):
   dim when OFF, heat-lit when ON. The printer icon IS the control. */
.pmx-del {
  height: 24px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent;
  color: var(--text-muted); font-family: var(--font-sans); font-size: 10.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.pmx-del:hover { color: var(--status-out); border-color: var(--status-out); }
.pmx-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 auto; padding: 0; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .12s, color .12s;
}
.pmx-x:hover { background: var(--surface-input); color: var(--text-strong); }

/* ── TOP GRID ── */
.pmx-top {
  position: relative;
  display: grid; grid-template-columns: 1fr; align-items: stretch;
  /* Stylized hero band: a warm gold glow up top fading into the carbon gradient,
     with a player-headshot watermark (set per-player in JS via --pmx-photo). */
  background:
    radial-gradient(140% 95% at 90% -25%, rgba(182,138,78,.24), transparent 58%),
    linear-gradient(135deg, var(--ink-850), var(--ink-900));
  border-bottom: 1px solid var(--border-hair);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
/* Player headshot in the header — a visible-but-tasteful hero treatment. JS sets
   --pmx-photo to the ESPN URL; the gradient mask fades it into the gold glow so
   the name/badges stay readable. Hidden when no photo is available. */
.pmx-top::after {
  content: ""; position: absolute; top: 0; right: 0; width: 360px; height: 176px;
  background-image: var(--pmx-photo, none);
  background-size: cover; background-position: top center;
  opacity: .42; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 78%), linear-gradient(0deg, transparent 4%, #000 50%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(100deg, transparent 18%, #000 78%), linear-gradient(0deg, transparent 4%, #000 50%);
}
.pmx-top > * { position: relative; z-index: 1; }
.pmx-col { min-width: 0; }
.pmx-id {
  display: flex; flex-direction: column; gap: 8px; padding: 13px 18px;
}

/* identity head */
.pmx-id-head { display: flex; align-items: center; gap: 15px; }
.pmx-jersey {
  position: relative;
  width: 50px; height: 50px; flex: 0 0 auto; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 28%, var(--ink-800), var(--ink-950)) !important;
  border: 2px solid var(--heat-500);
  box-shadow: var(--glow-heat), inset 0 1px 0 rgba(255,255,255,.10);
}
.pmx-jersey-num {
  font-family: var(--font-display); font-size: 23px; line-height: .9; font-weight: 500;
  background: linear-gradient(180deg, #F0DCA8, #C79A56);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pmx-id-namewrap { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pmx-nm {
  font-family: var(--font-display); font-size: 23px; line-height: 1.2;
  color: var(--text-strong); letter-spacing: .01em; white-space: nowrap;
  font-weight: 600; padding-bottom: 1px;
}
/* Captain badge — a clickable "Captain" pill, red like the NFL captain's patch.
   Off = dashed faint pill inviting a click; on = solid red. */
/* Captain badge matches the roster-status pill: same size/shape/typography,
   tinted like the status family. Off = greyed/recessed; on = red captain tint. */
.pmx-cap {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: var(--radius-md);
  background: var(--surface-input); border: 1px solid var(--border-strong);
  color: var(--text-muted); font-family: var(--font-sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1; cursor: pointer;
  flex: 0 0 auto; user-select: none; white-space: nowrap; opacity: .7;
  transition: border-color .12s, color .12s, background .12s, opacity .12s;
}
.pmx-cap:not(.pmx-cap-on)::before { content: "+"; font-weight: 800; font-size: 12px; opacity: .9; }
.pmx-cap:hover {
  border-color: rgba(226,59,59,.42); color: var(--status-out); background: rgba(226,59,59,.10); opacity: 1;
}
.pmx-cap.pmx-cap-on {
  background: rgba(226,59,59,.10); border: 1px solid rgba(226,59,59,.42);
  color: var(--status-out); opacity: 1;
}
.pmx-cap.pmx-cap-on::after { content: "\2713"; font-weight: 800; }

/* status badge (pill) — scoped to modal so it survives JS className reset */
.modal.pmx .pm-status-badge {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 10px; border-radius: var(--radius-md);
  background: var(--grn-wash); border: 1px solid rgba(88,192,140,.45); color: var(--grn-400);
  font-family: var(--font-sans); font-weight: 700; font-size: 10.5px;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
}
.modal.pmx .pm-status-badge.pm-st-q,
.modal.pmx .pm-status-badge.pm-st-d  { background: rgba(240,169,46,.12); border-color: rgba(240,169,46,.42); color: var(--status-quest); }
.modal.pmx .pm-status-badge.pm-st-d  { background: rgba(240,115,46,.12); border-color: rgba(240,115,46,.42); color: var(--status-doubt); }
.modal.pmx .pm-status-badge.pm-st-out,
.modal.pmx .pm-status-badge.pm-st-ir,
.modal.pmx .pm-status-badge.pm-st-pup,
.modal.pmx .pm-status-badge.pm-st-nfi,
.modal.pmx .pm-status-badge.pm-st-susp,
.modal.pmx .pm-status-badge.pm-st-dnp { background: rgba(226,59,59,.10); border-color: rgba(226,59,59,.42); color: var(--status-out); }
.modal.pmx .pm-status-badge.pm-st-ps  { background: var(--surface-input); border-color: var(--border-strong); color: var(--text-muted); }
.modal.pmx .pm-status-badge.pm-st-scratch { background: rgba(226,184,94,.14); border-color: rgba(226,184,94,.42); color: var(--status-quest); }

/* phonetics */
.pmx-phon { position: relative; display: flex; gap: 8px; padding-right: 32px; }
.pmx-phon-revert {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 20px; height: 20px; display: none; align-items: center; justify-content: center;
  padding: 0; border: 1px solid var(--heat-600); border-radius: 50%;
  background: var(--ink-900); color: var(--heat-400);
  font-size: 12px; line-height: 1; cursor: pointer; z-index: 6;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.pmx-phon-revert:hover { background: var(--heat-600); color: #fff; }
.pmx-phon.pm-has-val .pmx-phon-revert { display: flex; }
.pmx-phon .pm-phon-part {
  flex: 1; min-width: 0; box-sizing: border-box; margin: 0;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 5px 10px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  color: var(--text-secondary); line-height: 1.4; outline: none;
}
.pmx-phon .pm-phon-part.pm-empty:empty::before {
  content: attr(data-ph); color: var(--text-faint); font-style: italic;
}
.pmx-phon .pm-phon-part:focus { box-shadow: var(--ring-focus); border-color: var(--border-focus); }

/* bio line */
.pmx-bio {
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 7px 11px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--text-strong); line-height: 1.4; outline: none;
}
.pmx-bio:focus { box-shadow: var(--ring-focus); border-color: var(--border-focus); }

/* facts grid */
.pmx-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
}
.pmx-facts .pm-fact { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pmx-facts .pm-fact-k {
  font-family: var(--font-sans); font-weight: 600; font-size: 10px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint);
}
.pmx-facts .pm-fact-v {
  position: relative;
  font-family: var(--font-sans); font-weight: 600; font-size: 13.5px;
  color: var(--text-strong); line-height: 1.3; outline: none;
  border-radius: 5px; padding: 1px 4px; margin: -1px -4px;
}
.pmx-facts .pm-fact-v[contenteditable]:hover { background: var(--heat-wash); }
.pmx-facts .pm-fact-v[contenteditable]:focus { background: var(--heat-wash); box-shadow: var(--ring-focus); }
.pmx-facts .pm-fact-v.pm-empty { color: var(--text-faint); font-style: italic; }
.pmx-facts .pm-fact-v.pm-modified { background: var(--heat-wash); box-shadow: inset 0 0 0 1px var(--heat-600); }
.pmx-facts .pm-fact-v.pm-readonly { color: var(--text-strong); }

/* contract row */
.pmx-contract-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--grn-wash); border: 1px solid rgba(88,192,140,.4);
  border-radius: var(--radius-sm); padding: 7px 12px;
}
.pmx-contract-lbl { flex: 0 0 auto; }
.pmx-contract-val {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--grn-400); flex: 1; min-width: 0;
}
.pmx-ovr {
  display: none; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--heat-300);
}
.pmx-ovr.pm-modified { display: inline-flex; }
.pmx-ovr .pm-ovr-lbl {
  font-family: var(--font-sans); font-size: 8.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--heat-400);
}

/* ── stacked identity fields (bio / acq / contract / gpgs) ── */
.pmx-field {
  width: 100%; box-sizing: border-box; margin: 0;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 7px 11px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--text-strong); line-height: 1.4; outline: none;
  cursor: text;
}
.pmx-field:focus { box-shadow: var(--ring-focus); border-color: var(--border-focus); }
.pmx-field.pm-empty:empty::before {
  content: attr(data-ph); color: var(--text-faint); font-style: italic; font-weight: 500;
}
.pmx-acq-field, .pmx-bio-field { color: var(--text-secondary); }
.pmx-field.pm-modified { background: var(--heat-wash); box-shadow: inset 3px 0 0 0 var(--heat-400), inset 0 0 0 1px var(--heat-600); }

/* per-field revert affordance for the composed identity boxes (bio/acq/contract/gp) */
.pmx-fw-id { position: relative; display: block; width: 100%; }
.pmx-bio-row > .pmx-fw-id, .pmx-acq-row > .pmx-fw-id,
.pmx-contract-block > .pmx-fw-id, .pmx-gpgs-row > .pmx-fw-id { flex: 1; min-width: 0; }
.pmx-revert {
  position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
  width: 18px; height: 18px; display: none; align-items: center; justify-content: center;
  padding: 0; border: 1px solid var(--heat-600); border-radius: 50%;
  background: var(--ink-900); color: var(--heat-400);
  font-size: 12px; line-height: 1; cursor: pointer; z-index: 6;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.pmx-revert:hover { background: var(--heat-600); color: #fff; }
.pmx-fw-id:has(> .pmx-field.pm-modified) > .pmx-revert { display: flex; }
.pmx-fw-id:has(> .pmx-field.pm-modified) > .pmx-field { padding-right: 32px; }

.pmx-bio-row, .pmx-acq-row { display: flex; align-items: center; gap: 10px; }
.pmx-bio-row > .pmx-field, .pmx-acq-row > .pmx-field { flex: 1; min-width: 0; }
.pmx-contract-block { display: flex; align-items: center; gap: 10px; }
.pmx-contract-field {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--grn-400); background: var(--grn-wash);
  border-color: rgba(88,192,140,.4);
}
.pmx-contract-field.pm-modified { background: var(--grn-wash); box-shadow: inset 0 0 0 1px var(--grn-500); }

/* ======================================================================
   READ-ONLY MODAL  (.pmx.pm-readonly)
   The modal is a clean display surface — all edits live on the card.
   Strip input chrome from identity/stat fields → tight, stylized text.
   Phonetic rides directly under the name as a subtle pronunciation line.
   ====================================================================== */

/* ── Read-only identity: keep the canonical boxed look, just non-interactive.
   Data fields display as styled surface-input boxes (matching the approved
   design) but can't be edited — all edits live on the card. Empty boxes are
   hidden so the panel stays tight. Phonetic + notes remain editable. ── */
/* De-chromed: identity fields read as clean, uniform text (no input boxes).
   Double-click drops into edit (handled in JS) and re-chromes that one field. */
.pmx.pm-readonly .pmx-field {
  cursor: default; background: transparent; border-color: transparent;
  padding: 1px 0; border-radius: 0; font-size: 12.5px; min-height: 0;
}
.pmx.pm-readonly .pmx-field:focus { box-shadow: none; border-color: transparent; }
.pmx.pm-readonly .pmx-contract-field { color: var(--grn-400); font-weight: 700; }
.pmx.pm-readonly .pmx-contract-field:focus { border-color: transparent; }
/* The one field being double-click-edited re-gains its box so it's obvious. */
.pmx.pm-readonly .pmx-field.pm-dc-edit {
  background: var(--surface-input); border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm); padding: 6px 10px; cursor: text;
  box-shadow: var(--ring-focus);
}
/* Draft/acq pedigree: draft line on top, acquisition stacked underneath it
   (user: "not enough space between how acquired and drafted — put how acquired
   underneath"). Toggle floats top-right so the two text lines read cleanly. */
.pmx.pm-readonly .pmx-acq-field { white-space: nowrap; font-size: 12px; }
.pmx.pm-readonly .pmx-acq-row {
  flex-direction: column; align-items: flex-start; gap: 2px;
  position: relative; padding-right: 22px;
}
.pmx.pm-readonly .pmx-acq-row > .pmx-field { flex: 0 0 auto; width: 100%; }
.pmx.pm-readonly .pmx-acq-row > .pmx-acq-tog {
  position: absolute; top: 0; right: 0;
}
/* Acquisition line reads the same as the draft line above it. */
.pmx.pm-readonly #pmAcqLine { color: var(--text-secondary); font-size: 12px; }
/* Tighter row rhythm now that fields are text, not boxes. */
.pmx.pm-readonly .pmx-bio-row,
.pmx.pm-readonly .pmx-acq-row,
.pmx.pm-readonly .pmx-contract-block,
.pmx.pm-readonly .pmx-gpgs-row { margin: 1px 0; }
/* Hide empty identity fields entirely (no placeholders inviting edits) */
.pmx.pm-readonly .pmx-field.pm-empty { display: none; }
/* Kill all revert affordances + their reserved padding */
.pmx.pm-readonly .pmx-revert,
.pmx.pm-readonly .pmx-phon-revert,
.pmx.pm-readonly .pm-num-revert { display: none !important; }
.pmx.pm-readonly .pmx-fw-id:has(> .pmx-field.pm-modified) > .pmx-field { padding-right: 11px; }
/* Modified fields keep the heat-tint box so divergence is still visible */

/* ── Phonetic: stays editable (broadcaster's pronunciation), boxed and
   left-justified DIRECTLY under the name (indented past the jersey). ── */
.pmx.pm-readonly .pmx-phon {
  margin-top: 0; margin-left: 0;   /* grid column already aligns flush under the name */
  gap: 8px; padding-right: 0; align-items: center;
}
.pmx.pm-readonly .pmx-phon .pm-phon-part {
  flex: 0 0 auto; min-width: 116px;   /* standard width so the field never collapses to text size */
  display: inline-flex; align-items: center; min-height: 34px;
  background: var(--surface-input); border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm);
  padding: 0 11px; font-size: 14px; font-style: italic; font-weight: 600;
  color: var(--text-muted); line-height: 1.15; box-sizing: border-box;
}
/* No inline revert glyph on the phonetic in readonly (Reset handles reverts). */
.pmx.pm-readonly .pmx-phon .pm-phon-part.pm-modified::after { content: none; }
/* While editing a phonetic part it boxes up but keeps the SAME standard width
   (min-width above) so the field doesn't shrink/jump when clicked. */
.pmx.pm-readonly .pmx-phon .pm-phon-part.pm-editing,
.pmx.pm-readonly .pmx-phon .pm-phon-part.pm-dc-edit {
  background: var(--surface-input); border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm); padding: 2px 8px; font-style: normal;
}
/* The edit input fills the standard-width part instead of a fixed 110px box. */
.pmx.pm-readonly .pmx-phon .pm-phon-part-input { width: 100%; min-width: 80px; }
/* The phonetic separator: only meaningful in readonly when both set; in the
   tucked layout the 14px gap already separates them, so keep it subtle. */
.pmx.pm-readonly .pmx-phon .pm-phon-sep { display: none !important; }

/* ── Header right column: status badge only ──
   The availability summary (designation · snaps · missed) is REDUNDANT with
   the status pill here and the full injury panel on the right, so it's hidden
   to avoid showing the same thing three times. */
.pmx-id-statuswrap {
  margin-left: auto; display: flex; flex-direction: column;
  align-items: flex-end; gap: 5px; flex: 0 0 auto;
}
.pmx-inj-chips .pm-status-badge { margin-left: 0; flex: 0 0 auto; }
.pmx.pm-readonly .pmx-hdr-avail { display: none !important; }
/* Keep the name from colliding with the status pill: name truncates, the
   abbreviated pill (QUES/OUT/IR) holds its own column on the right. */
.pmx-id-namewrap { overflow: hidden; }
.pmx-id-namewrap .pmx-nm { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Snap bar isn't in the canonical design — usage shows as text. Hide it. */
.pmx.pm-readonly #pmSnapBar { display: none !important; }

/* Bio facts (legacy grid, if shown): read-only text */
.pmx.pm-readonly .pmx-facts .pm-fact-v { cursor: default; }
.pmx.pm-readonly .pmx-facts .pm-fact-v[contenteditable]:hover { background: transparent; }

/* ── Gray out fields that won't print ──
   A field whose print toggle is OFF is dimmed so the broadcaster can see at a
   glance what's excluded from the board. JS (pmSyncFieldGrayout) tags the exact
   value element, so fields sharing a row dim independently and the toggle
   buttons (which are never tagged) stay fully lit and clickable. */
.pmx.pm-readonly .pmx-pf-off,
.pmx.pm-readonly .pmx-pf-off.pm-empty {
  opacity: .34;
  transition: opacity .12s;
}

/* Injury detail line: stays a visible, fillable box even when empty so the
   broadcaster always has a place to type a status note (per user request). */
.pmx.pm-readonly .pmx-inj-text { cursor: text; }
.pmx.pm-readonly .pmx-inj-text.pm-empty {
  display: flex; align-items: center;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 0 11px;
  min-height: 34px; height: 34px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pmx-review {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-input); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: 6px 10px; margin-top: -2px;
}
.pmx-review-head {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-secondary);
}
.pmx-review-src {
  font-family: var(--font-sans); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--acq-500);
}
.pmx-review-val { color: var(--grn-400); }
.pmx-review-acts { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.pmx-review-use, .pmx-review-keep {
  font-family: var(--font-sans); font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  border-radius: var(--radius-xs); padding: 4px 9px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-secondary);
}
.pmx-review-use { background: var(--accent-grad); border-color: var(--heat-600); color: var(--text-on-heat); }
.pmx-review-keep:hover { color: var(--text-strong); }

.pmx-gpgs-field {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-strong);
}
/* ── Identity field grid: two symmetric columns of uniform boxes ──
   Col 1: bio / draft / acquisition / contract.  Col 2: games / missed.
   Every line is a bordered box with its print toggle sitting next to it. */
/* Strict two-equal-column grid: bio | draft, contract | —, then the games+missed
   pair on its own full-width row (itself two equal columns: games | missed).
   Columns are always 1fr / 1fr so every box edge lines up — perfectly symmetric. */
.pmx-idfields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; align-items: start; }
/* Each column is a vertical stack. Col1: bio·draft·acq·contract · Col2: injury detail (from the inj-line above) · games · missed.
   14px column-gap matches .pmx-inj-line so the col-2 edge lines up across both rows — razor-sharp. */
.pmx-idcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pmx-idpair {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; align-items: start;
}
.pmx-frow { display: flex; align-items: center; gap: 8px; }
.pmx-frow > .pmx-prn { flex: 0 0 auto; }
/* The box itself fills the row; print toggle sits to its right. */
.pmx-fbox { flex: 1 1 auto; min-width: 0; }
.pmx.pm-readonly .pmx-fbox {
  display: flex; align-items: center; gap: 8px;
  min-height: 28px; padding: 0 10px;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-field); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Missed can hold several weeks; let it wrap to a second row and grow rather
   than clip when the list is long. */
.pmx.pm-readonly .pmx-fbox.pmx-inj-missed {
  white-space: normal; overflow: visible; flex-wrap: wrap;
  align-items: center; height: auto; min-height: 28px;
  padding-top: 4px; padding-bottom: 4px;
}
/* Placeholder when a player has no missed games: keep the box for column
   balance, dim the dash, and hide its (no-op) print toggle. */
.pmx-inj-missed-none { color: var(--text-faint); font-family: var(--font-mono); font-weight: 600; }
.pmx-frow.pmx-frow-empty > .pmx-prn { visibility: hidden; }
/* Hide a whole row (box + its print toggle) when the box has no data, so an
   empty field never leaves an orphaned print icon. */
.pmx.pm-readonly .pmx-frow:has(> .pmx-fbox.pm-empty) { display: none; }

/* ── TOGGLE SWITCH ── */
/* Print control — printer-icon button (matches design mock) */
.pmx-prn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: 0 0 auto; padding: 0;
  border: none; border-radius: 6px; background: transparent;
  color: var(--text-faint); opacity: .5; cursor: pointer;
  transition: color .12s, opacity .12s;
}
.pmx-prn:hover { opacity: .85; }
.pmx-prn.on { color: var(--heat-400); opacity: 1; }

/* ── SECTION ROW HEADERS ── */
.pmx-sec-row { display: flex; align-items: center; gap: 10px; }
.pmx-sec-sp { flex: 1; }
.pmx-sec-meta {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pmx-srclink {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-weight: 600; font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap;
}
.pmx-src-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--heat-400); flex: 0 0 auto; }

/* ── INJURY PANEL (v26 Carbon & Brass) ── */
.pmx-inj { display: flex; flex-direction: column; }
.pmx-inj-chips { display: flex; align-items: center; gap: 9px; }
/* identity head: jersey on the left, then a 3-row grid. Left column = name /
   phonetic / honors; right column = roster+injury status / practice / injury
   detail -- all right-aligned. */
.pmx-id-head { align-items: flex-start; gap: 15px; }
.pmx-id-grid {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; row-gap: 2px; column-gap: 12px;
}
/* Right column: roster status pill (row 1) and PB/AP honors (row 2) both
   right-justify to the same edge. */
.pmx-id-grid > .pmx-inj-chips-status,
.pmx-id-grid > .pmx-honors { justify-self: end; margin: 0; }
.pmx-inj-chips-status { flex-wrap: wrap; justify-content: flex-end; align-items: stretch; }
.pmx-id-grid > .pmx-honors { justify-content: flex-end; gap: 6px; }
/* Row-2 honors badges match the row-1 pill height (26px) for a uniform header. */
.modal.pmx .pmx-id-grid > .pmx-honors .pmx-hon { height: 26px; min-height: 26px; align-self: center; padding: 0 9px; }
/* All badges ride one row on the name line: don't let the cluster wrap (it fits),
   and tighten padding/gaps so the five fit even on a narrow window. */
.modal.pmx .pmx-inj-chips-status { flex-wrap: nowrap; gap: 6px; }
.modal.pmx .pmx-inj-chips-status .pm-status-badge,
.modal.pmx .pmx-inj-chips-status .pmx-cap,
.modal.pmx .pmx-inj-chips-status .pmx-hon { height: 26px; min-height: 26px; align-self: center; padding: 0 7px; }
/* Honors (PB/AP) now ride on the name row with the other badges. */
.pmx-inj-chips-status .pmx-honors { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
/* Captain then status, kept adjacent at the right (no auto-margin spread). */
.modal.pmx .pmx-inj-chips-status .pm-status-badge { margin-left: 0; }
.pmx-inj-chips-status .pmx-inj-chip { justify-content: center; }
/* row 2 left: phonetics inline within the grid */
.pmx-id-grid > .pmx-phon { margin: 0; }

/* ── Injury line: status · practice · detail, left-aligned to the card ── */
.pmx-inj-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  margin: 4px 0 2px;
}
/* Two equal columns matching the id fields below: status + practice chips on the
   left (aligned with bio), injury-detail box on the right (aligned with GAMES). */
.pmx.pm-readonly .pmx-inj-line {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 14px; align-items: center; flex-wrap: nowrap;
}
.pmx-inj-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.pmx.pm-readonly .pmx-inj-frow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pmx.pm-readonly .pmx-inj-frow > .pmx-fw-id { flex: 1 1 0; min-width: 0; }
/* Injury detail field: identical box whether empty or filled, so typing
   never changes its size. Single line, ellipsis on overflow. */
.pmx.pm-readonly .pmx-inj-line .pmx-inj-text {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center;
  height: 34px; min-height: 34px; box-sizing: border-box; padding: 0 11px;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pmx-inj-line .pmx-inj-prac { flex: 0 0 auto; }
.pmx-inj-line > .pmx-inj-chip { flex: 0 0 auto; }
.pmx-inj-line .pmx-prn { flex: 0 0 auto; }
.pmx-inj-prac { display: flex; gap: 6px; }
.pmx-inj-sp { flex: 1; }
.pmx-inj-chip {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 36px; padding: 3px 8px; flex: 0 0 auto;
  background: var(--surface-input); border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm);
}
.pmx-inj-chip .pmx-chip-lbl {
  font-family: var(--font-sans); font-size: 8.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
}
.pmx-inj-chip .pmx-chip-val {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--text-strong);
}
.pmx-inj-status-chip .pmx-chip-val { text-transform: uppercase; }
/* editable injury-status / practice chips */
.pmx-inj-chip-edit { cursor: pointer; transition: border-color .12s, background .12s; }
.pmx-inj-chip-edit:hover { border-color: var(--border-strong); background: var(--surface-input-hover, rgba(255,255,255,.05)); }
.pmx-inj-chip-mod { border-color: var(--heat-400); }

.pmx-inj-textrow { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pmx-inj-text { flex: 1; min-width: 0; }

/* Missed box is now an .pmx-fbox; this rule only governs its inner layout. */
.pmx-inj-missed {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  box-sizing: border-box; min-width: 0;
}
.pmx-inj-missed > .pmx-chip-lbl {
  flex: 0 0 auto; font-family: var(--font-sans); font-size: 9px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
}
.pmx-inj-missed-list { display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; }
.pmx-inj-missed-item { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.pmx-inj-missed-item b {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--status-out);
}
.pmx-inj-missed-item span {
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; color: var(--text-secondary);
}

/* ── NOTE TEXTAREAS ── */
.pmx-note {
  width: 100%; box-sizing: border-box; min-height: 52px; resize: vertical;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); color: var(--text-body);
  font-family: var(--font-sans); font-size: 13px; line-height: 1.5; padding: 9px 11px;
  outline: none;
}
.pmx-note:focus { box-shadow: var(--ring-focus); border-color: var(--border-focus); }
.pmx-note::placeholder { color: var(--text-faint); font-style: italic; }
.pmx-note-tp { min-height: 90px; }
/* Last 3 Games + Notes share a row at the top of the production column —
   the box score is narrow, so Notes fills the empty space beside it. */
/* Talking-points Notes block now lives in the desk, under the injury panel. */
.pmx-desk .pmx-notes-block { margin-top: 2px; }
.pmx-notes-block .pmx-note-tp { min-height: 96px; }

/* edited-note indicator + per-field reset (matches coach modal cm2-fw) */
.pmx-fw { position: relative; display: block; width: 100%; }
.pmx-note-reset {
  position: absolute; top: 4px; right: 5px; width: 17px; height: 17px;
  display: none; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--heat-600); border-radius: 50%;
  background: var(--ink-900); color: var(--heat-400);
  font-size: 11px; line-height: 1; cursor: pointer; z-index: 6;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.pmx-note-reset:hover { background: var(--heat-600); color: #fff; }
.pmx-fw.pm-modified > .pmx-note-reset { display: flex; }
.pmx-fw.pm-modified > .pmx-note { background: var(--heat-wash); box-shadow: inset 0 0 0 1px var(--heat-600); }
.pmx-statbox .pmx-fw.pm-modified > .pmx-note { border-radius: var(--radius-sm); }

/* Inline "+ note" inside a stat box — slim italic field under the stat line(s). */
.pmx-statbox .pmx-note {
  min-height: 0; resize: none;
  background: transparent; border: none; border-top: 1px solid var(--border-hair);
  border-radius: 0; box-shadow: none;
  color: var(--text-secondary); font-family: var(--font-sans);
  font-size: 11.5px; font-style: italic; line-height: 1.4; padding: 6px 11px;
}
.pmx-statbox .pmx-note:focus { box-shadow: none; border-top-color: var(--border-strong); }
.pmx-statbox .pmx-note::placeholder { color: var(--text-faint); font-style: italic; }

/* ── STATS GRID ── */
/* Same horizontal geometry as the identity (.pmx-id padded 18px > .pmx-idfields
   grid gap 14px) so the two sections' columns, box edges and print toggles all
   line up by construction. */
.pmx-stats { padding: 0 18px; border-top: 1px solid var(--border-hair); }
.pmx-statgrid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 14px; row-gap: 12px; align-items: stretch;
}
.pmx-prod {
  display: flex; flex-direction: column; gap: 10px;
  padding: 15px 0;
}

/* Single boxed stat field per section (matches design mock StatField):
   one --surface-input box holds the mono stat line(s) + an inline italic "+ note",
   separated by hairlines. Per-row category labels are suppressed — the section
   header is the label and the stat line is self-describing. */
/* Bio Notes — persistent per-player scouting note (master file, gsis-keyed). */
.pmx-bionote {
  flex: 1 1 auto; min-height: 120px; padding: 9px 11px;
  /* Reserve the same 30px print-toggle gutter (8px gap + 22px toggle) as the
     GAMES/MISSED boxes so the right column's box edges all line up. */
  margin: 0 30px 4px 0;
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px; line-height: 1.5;
  color: var(--text-strong); outline: none; overflow-y: auto;
}
.pmx-bionote:focus { border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.pmx-bionote:empty::before {
  content: attr(data-ph); color: var(--text-faint); font-style: italic; pointer-events: none;
}
.pmx-bionote-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-sans); font-size: 9px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint);
}
.pmx-bionote-tag.is-saved { color: var(--grn-400); }
.pmx-bionote-tag .pmx-bn-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto;
}

.pmx-statbox {
  background: var(--surface-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
}
.pmx-statbox:focus-within { box-shadow: var(--ring-focus); border-color: var(--border-focus); }

.pmx-stat-rows { display: flex; flex-direction: column; }
.pmx-stat-rows .pm-sr { display: flex; flex-direction: row; align-items: center; }
.pmx-stat-rows .pm-sr + .pm-sr { border-top: 1px solid var(--border-hair); }
.pmx-stat-rows .pm-sr-lbl {
  display: block; flex: 0 0 auto; width: 30px;
  font-family: var(--font-field); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
  padding-left: 9px; white-space: nowrap;
}
.pmx-stat-rows .pm-sr-val {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-field); font-size: 12px; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums;
  color: var(--text-strong);
  background: transparent; border: none; border-radius: 0;
  padding: 4px 6px 4px 3px; line-height: 1.35; outline: none;
  white-space: normal; overflow: visible; overflow-wrap: anywhere;
}
.pmx-stat-rows .pm-sr-val.pm-sr-modified { color: var(--heat-300); }

/* Per-row / per-note / practice / missed print toggles — uniform 22px, gutter-aligned. */
.pmx-prn-sm { width: 22px; height: 22px; flex: 0 0 auto; }
.pmx-prn-sm svg { width: 14px; height: 14px; }

/* Stat boxes reserve the same 32px right gutter as identity fields so every box
   shares one right edge, and per-row toggles live in that gutter (aligned with the
   section-header toggle above). */
/* 30px gutter (8px gap + 22px toggle) matches the identity/GAMES frows so the
   stat-box edges and per-row toggles line up with the rest of the column. */
.pmx-prod .pmx-statbox { margin-right: 30px; overflow: visible; }
.pmx-stat-rows .pm-sr { position: relative; }
.pmx-stat-rows .pm-sr > .pmx-prn-sm {
  position: absolute; right: -30px; top: 50%; transform: translateY(-50%); margin: 0;
}
.pmx-statbox .pmx-fw { position: relative; }
.pmx-statbox .pmx-fw > .pmx-prn-note {
  position: absolute; right: -32px; top: 6px;
}

/* ── Snap-share bar (availability panel) ── */
.pmx-snapbar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pmx-snap-lbl {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em;
  color: var(--text-faint); white-space: nowrap;
}
.pmx-snap-track { flex: 1 1 auto; height: 8px; background: var(--panel3, rgba(255,255,255,.06)); border-radius: 4px; overflow: hidden; }
.pmx-snap-fill { height: 100%; background: var(--heat-400, var(--accent, #d8ae6e)); border-radius: 4px; }

/* Custom stat tooltip — larger, readable definition (native title is tiny and
   unstyleable). Renders above the hovered label. */
.pmx-tip { position: relative; }
.pmx-tip::after {
  content: attr(data-tip);
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 60;
  width: max-content; max-width: 280px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--ink-950, #0c0e12); border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0; text-transform: none; line-height: 1.45;
  color: var(--text-strong); white-space: normal; text-align: left;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .12s, transform .12s; transition-delay: 0s;
}
.pmx-tip:hover::after { opacity: 1; transform: translateY(0); transition-delay: .25s; }
/* ── HONORS strip (career accolades) ── */
.pmx-honors {
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
  padding: 0; border: none; background: transparent;
}
.pmx-hon {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; padding: 0 11px; box-sizing: border-box;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; color: var(--text-muted);
  background: var(--surface-input); border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm); white-space: nowrap;
}
.pmx-hon b { color: var(--heat-300, var(--accent)); font-weight: 800; font-size: 12.5px; }
.pmx-hon-hof { border-color: var(--heat-500, var(--accent)); }
.pmx-hon-hof b { color: var(--heat-300, var(--accent)); }

/* ── KPI strip (hero cells) — removed from redesign (data lives in the
   stat sections + card); kept rule for any legacy reference but hidden. ── */
.pmx-kpis {
  display: none !important;
}
.pmx-kpis .pm-kpi { padding: 12px 8px; text-align: center; border-right: 1px solid var(--border); }
.pmx-kpis .pm-kpi:last-child { border-right: none; }
.pmx-kpis .pm-kpi-l {
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-faint);
}
.pmx-kpis .pm-kpi-v {
  font-family: var(--font-disp, var(--font-sans)); font-size: 1.55rem; font-weight: 700;
  line-height: 1.05; margin-top: 2px; color: var(--text-strong);
}
.pmx-kpis .pm-kpi-v.pm-kpi-text { font-size: 1rem; }
.pmx-kpis .pm-kpi-v.pm-kpi-good { color: var(--grn-400); }
.pmx-kpis .pm-kpi-v.pm-kpi-warn { color: var(--heat-300, var(--accent)); }
.pmx-kpis .pm-kpi-v.pm-kpi-alert { color: var(--status-out); }
.pmx-kpis .pm-kpi-s { font-size: 9.5px; color: var(--text-muted); margin-top: 1px; min-height: 12px; }

/* ── LAST 3 GAMES weekly box ── */
.pmx-l3 { margin-bottom: 14px; }
.pmx-l3-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.pmx-l3-table th, .pmx-l3-table td {
  text-align: right; padding: 5px 6px; border-bottom: 1px solid var(--border-hair);
  font-variant-numeric: tabular-nums;
}
.pmx-l3-table th {
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint);
}
.pmx-l3-table td { color: var(--text-secondary); }
.pmx-l3-table th.pmx-l3-g, .pmx-l3-table td.pmx-l3-g {
  text-align: left; color: var(--text-strong); font-weight: 600; white-space: nowrap;
}

/* ── Last 3 Games — one line per game: bold WK/opp label, then the stat line. ── */
.pmx-l3-list { display: flex; flex-direction: column; gap: 4px; }
.pmx-l3-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pmx-l3-box {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: baseline; gap: 9px;
  background: var(--surface-input, rgba(255,255,255,.03));
  border: 1px solid var(--border-hair); border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.pmx-l3-wk {
  flex: 0 0 auto;
  font-family: var(--font-field); font-size: 12px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: var(--text-strong);
}
.pmx-l3-stat {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-field); font-size: 12px; font-weight: 600;
  color: var(--text-secondary); font-variant-numeric: tabular-nums; line-height: 1.3;
}
.pmx-l3-dnp { color: var(--text-faint); font-style: italic; font-weight: 500; }
.pmx-l3-prn { flex: 0 0 auto; align-self: center; }

/* ── IDS footer (gsis / espn / pfr) ── */
.pmx-ids {
  display: flex; gap: 14px; flex-wrap: wrap; padding: 11px 22px;
  border-top: 1px solid var(--border); background: var(--panel2, rgba(255,255,255,.03));
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-faint);
}

/* revert icons (hidden until modified) */
.modal.pmx .pm-revert-btn,
.modal.pmx .pm-sr-revert,
.modal.pmx .pm-num-revert {
  display: none; cursor: pointer; color: var(--heat-400);
  font-size: 11px; margin-left: 6px;
}
.modal.pmx .pm-fact-v.pm-modified .pm-revert-btn,
.modal.pmx .pm-sr-val.pm-sr-modified .pm-sr-revert { display: inline; }

/* ── FOOTER ── */
.pmx-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 24px; border-top: 1px solid var(--border-hair); background: var(--surface-raised);
}
.pmx-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 10px; border-radius: 7px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; cursor: pointer; white-space: nowrap; transition: filter .12s, background .12s;
}
.pmx-btn-ghost {
  border: 1px solid var(--border-strong); background: #181b21; color: var(--text-strong);
}
.pmx-btn-ghost:hover { background: var(--surface-input); color: var(--text-strong); }
/* Reset button lights up amber while any field is edited, with a live count. */
.pmx-btn-reset.has-edits {
  border-color: var(--heat-600); background: var(--heat-wash); color: var(--heat-300);
}
.pmx-edit-count {
  display: inline-flex; align-items: center; height: 17px; padding: 0 6px; margin-left: 2px;
  border-radius: 9px; background: var(--heat-600); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.pmx-btn-primary {
  border: 1px solid var(--heat-600); background: var(--accent-grad); color: var(--text-on-heat);
}
.pmx-btn-primary:hover { filter: brightness(1.06); }

/* ── STATUS MENU (re-skin within pmx) ── */
.modal.pmx .pm-status-menu {
  position: absolute; z-index: 40; min-width: 170px; padding: 5px;
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop); display: none;
}
.modal.pmx .pm-status-menu.pm-on { display: block; }
.modal.pmx .pm-status-menu-item {
  padding: 7px 12px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer;
}
.modal.pmx .pm-status-menu-item:hover { background: var(--surface-input); color: var(--text-strong); }

/* ── TOAST ── */
.modal.pmx .pm-toast {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(8px);
  padding: 8px 16px; border-radius: 999px;
  background: var(--grn-wash); border: 1px solid rgba(88,192,140,.4); color: var(--grn-400);
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
}
.modal.pmx .pm-toast.pm-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ──
   Collapse the two-column top to a single column BEFORE the columns get so
   narrow that the identity text crams into the desk (the "text collapses on
   resize" bug). The Last3+Notes row stacks at the same breakpoint. */
@media (max-width: 940px) {
  .pmx-top, .pmx-statgrid { grid-template-columns: 1fr; }
  .pmx-l3-cols { grid-template-columns: 1fr; }
  .modal.pmx { width: 100%; }
}

/* Collapse the docked notes under the editor only on genuinely narrow screens.
   On laptops the notes field must stay as the right-hand column (info | notes). */
@media (max-width: 720px) {
  .modal.pmx { width: 96vw; }
  .modal.pmx .pmx-body { flex-direction: column; }
  .modal.pmx .pmx-dock {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    border-left: none;
    border-top: 1px solid var(--border-strong);
  }
  .pmx-dock-scroll { padding: 14px; }
  .pmx-dock-card .pm-print-preview-card { max-width: 560px; margin: 0 auto; }
}
