/* BIG BALLIN styles */
:root {
  --bg: #0B0B12; --panel: #151525; --panel2: #1E1E33; --line: #2E2E4D; --line2: #4A4A70;
  --text: #F4F1E8; --muted: #A9A7C2; --soft: #D6D4E8;
  --yel: #FFD23F; --red: #FF4A3D; --blu: #3D8BFF;
  --display: 'Bungee', Impact, sans-serif;
  --pixel: 'Press Start 2P', monospace;
  --body: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 18px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 24px clamp(14px, 3vw, 40px) 56px; display: flex; flex-direction: column; gap: 22px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Header */
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.logo { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 68px); line-height: 1; color: var(--yel); text-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--blu); letter-spacing: 1px; }
.slate-line { margin: 10px 0 0; font-family: var(--pixel); font-size: 11px; line-height: 1.7; color: var(--muted); }
.cap { flex: 1 1 340px; max-width: 520px; background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cap-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cap-label { font-family: var(--pixel); font-size: 11px; color: var(--muted); }
.cap-left { font-family: var(--display); font-size: 32px; }
.cap-bar { height: 22px; background: var(--bg); border: 2px solid var(--line); border-radius: 4px; overflow: hidden; }
.cap-fill { height: 100%; transition: width 400ms ease; }
.cap-bottom { display: flex; justify-content: space-between; font-size: 17px; color: var(--muted); }
.cap-bonus { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 2px dashed var(--line); padding-top: 9px; }
.cap-bonus-val { font-family: var(--pixel); font-size: 13px; color: var(--muted); transition: color 200ms; white-space: nowrap; }
.cap-bonus-val.on { color: var(--blu); }
.cap-bonus-val.big { color: var(--yel); text-shadow: 2px 2px 0 var(--red); }
.cap-bonus-note { font-size: 16px; color: var(--muted); text-align: right; }
.board-math { font-family: var(--pixel); font-size: 11px; line-height: 1.9; color: var(--soft); }
.board-math b { color: var(--blu); font-weight: 400; }
footer { border-top: 2px solid var(--line); padding-top: 14px; font-size: 15px; color: var(--muted); line-height: 1.5; }
footer a { color: var(--soft); }
.banner { background: #2A1F05; border: 2px solid var(--yel); border-radius: 10px; padding: 12px 16px; font-size: 18px; }
.banner code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; background: var(--bg); padding: 2px 6px; border-radius: 4px; }

/* Tabs & buttons */
nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tab { min-height: 48px; padding: 0 20px; border-radius: 8px; border: 3px solid var(--line); background: var(--panel); font-family: var(--pixel); font-size: 12px; }
.tab[aria-pressed="true"] { background: var(--blu); border-color: var(--blu); color: var(--bg); }
.sound { margin-left: auto; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 2px solid var(--line2); background: transparent; color: var(--muted); font-family: var(--pixel); font-size: 10px; }
.btn { min-height: 46px; padding: 0 12px; border-radius: 8px; font-family: var(--pixel); font-size: 10px; border: 2px solid transparent; }
.btn-primary { background: var(--yel); color: var(--bg); box-shadow: 0 4px 0 #000; }
.btn-danger { background: var(--red); color: var(--bg); box-shadow: 0 4px 0 #000; }
.btn-off { background: var(--line); color: var(--muted); }
.btn-ghost { background: transparent; border-color: var(--blu); }
.btn-plain { background: transparent; border-color: var(--line2); }
.btn-cut { background: transparent; border-color: var(--red); color: var(--red); }
.pill { min-height: 44px; min-width: 56px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--line2); background: transparent; font-family: var(--pixel); font-size: 11px; }
.pill[aria-pressed="true"] { background: var(--yel); border-color: var(--yel); color: var(--bg); }
.search { min-height: 46px; padding: 0 14px; border-radius: 8px; border: 2px solid var(--line2); background: var(--panel); font-size: 19px; min-width: 0; flex: 1 1 220px; max-width: 360px; }
.search::placeholder { color: var(--muted); }
select.search { flex: 0 1 250px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.toolbar-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; }

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.slot { background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 210px; }
.slot.is-filled { border-color: var(--blu); box-shadow: 0 0 14px rgba(61, 139, 255, 0.3); }
.slot.is-active { border-color: var(--yel); box-shadow: 0 0 18px rgba(255, 210, 63, 0.45); }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.slot-pos { font-family: var(--pixel); font-size: 15px; color: var(--yel); }
/* 6th Man: the bench card (striped "bench" look, green accent) after the five starters. */
.slot.bench { background: repeating-linear-gradient(135deg, var(--panel) 0 14px, var(--panel2) 14px 28px); border-style: dashed; border-color: #2FBF71; }
.slot.bench.is-filled { border-style: solid; border-color: #2FBF71; box-shadow: 0 0 14px rgba(47, 191, 113, 0.3); }
.slot.bench.is-active { border-color: var(--yel); }
.slot.bench .slot-pos { color: #2FBF71; font-size: 12px; white-space: nowrap; }
.bench-meter { white-space: nowrap; font-family: var(--pixel); font-size: 9px; color: #2FBF71; background: var(--bg); border: 2px solid #2FBF71; border-radius: 6px; padding: 6px 8px; align-self: flex-start; }
.slot-empty small { display: block; margin-top: 8px; font-family: var(--body); font-size: 15px; color: var(--muted); }
.fb-chip.bench { border-color: #2FBF71; color: #2FBF71; }
.fb-chip.bench[aria-pressed="true"] { background: #2FBF71; border-color: #2FBF71; color: var(--bg); }
.slot-empty { flex: 1; min-height: 120px; border: 3px dashed var(--line2); background: transparent; color: var(--muted); border-radius: 10px; font-family: var(--pixel); font-size: 11px; line-height: 1.8; }
.slot.is-active .slot-empty { border-color: var(--yel); }
.slot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.slot-actions .btn { flex: 1 1 56px; min-height: 44px; font-size: 9px; }
.badge { font-family: var(--pixel); font-size: 9px; color: var(--bg); background: var(--muted); padding: 4px 6px; border-radius: 4px; }

/* Player bits */
.who { display: flex; gap: 12px; align-items: center; }
.jersey { position: relative; overflow: hidden; width: 56px; height: 56px; flex: none; border-radius: 8px; border: 3px solid var(--text); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 21px; color: #fff; }
.jersey img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
/* Inner size is a whole multiple of the 40px sprite (40 / 80 / 120) so pixels stay crisp. */
.jersey.sm { width: 44px; height: 44px; font-size: 17px; border-width: 2px; }
.jersey.md { width: 86px; height: 86px; font-size: 24px; }
.jersey.lg { width: 128px; height: 128px; font-size: 30px; border-width: 4px; }
.who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pname { margin: 0; font-size: 23px; font-weight: 700; line-height: 1.1; }
.sub { font-size: 17px; color: var(--muted); }
.price { font-family: var(--display); font-size: 22px; text-align: right; white-space: nowrap; }
.chg { display: block; font-family: var(--body); font-size: 15px; color: var(--muted); text-align: right; }
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard { background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pcard.on { border-color: var(--blu); }
.pc-top { display: flex; gap: 14px; align-items: center; }
.pc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fit { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fit .inj { vertical-align: 2px; }
@keyframes rowflash { 0%, 40% { background: rgba(255, 210, 63, 0.35); } 100% { background: #2A2A48; } }
tbody tr.flash-row, tbody tr.flash-row th { animation: rowflash 1.6s ease-out; }
.pc-pr { display: flex; align-items: baseline; gap: 10px; margin-top: 3px; }
.pc-pr .chg { display: inline; }
.pc-price { font-family: var(--display); font-size: 28px; line-height: 1; white-space: nowrap; }
.pc-key { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-key > div { background: var(--panel2); border-radius: 8px; padding: 7px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pc-key span { font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.pc-key b { font-size: 25px; font-weight: 700; }
.pc-line { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.3; }
.why { background: var(--panel2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.why h3 { margin: 0; font-family: var(--pixel); font-size: 10px; font-weight: 400; color: var(--muted); }
.why-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 17px; }
.why-row b { font-family: var(--display); font-weight: 400; font-size: 19px; white-space: nowrap; }
.why-sub { font-size: 15px; color: var(--muted); line-height: 1.35; }
.why-total { border-top: 2px dashed var(--line2); padding-top: 8px; }
.nums { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nums > div { background: var(--panel2); border-radius: 8px; padding: 8px 10px; }
.nums dt { font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.nums dd { margin: 6px 0 0; font-size: 26px; font-weight: 700; }
.yel { color: var(--yel); } .blu { color: var(--blu); } .red { color: var(--red); }
.line { margin: 0; font-size: 18px; color: var(--soft); }
.row-btns { display: flex; gap: 10px; }
.row-btns .btn:first-child { flex: 1; }
.row-btns .btn:last-child { flex: 1.4; }
.more { align-self: center; }

/* Stats */
.stats-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.stats-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.table-box { overflow: auto; max-height: 72vh; background: var(--panel); border: 3px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 19px; font-variant-numeric: tabular-nums; }
thead th { position: sticky; top: 0; z-index: 2; background: var(--panel2); padding: 0; font-weight: 400; }
thead th.left { text-align: left; padding: 0 12px; font-family: var(--pixel); font-size: 10px; color: var(--muted); }
thead th.corner { left: 0; z-index: 3; }
.sortbtn { width: 100%; min-height: 48px; padding: 0 8px; background: transparent; border: none; text-align: right; font-family: var(--pixel); font-size: 10px; color: var(--muted); white-space: nowrap; }
.sortbtn.on { color: var(--yel); }
tbody tr { border-top: 1px solid var(--line); }
tbody tr.sel { background: #2A2A48; }
tbody th { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; padding: 0 12px; font-weight: 400; }
tbody tr.sel th { background: #2A2A48; }
.namebtn { background: none; border: none; padding: 8px 0; min-height: 44px; text-align: left; font-size: 20px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; white-space: nowrap; }
tr.sel .namebtn { color: var(--yel); }
td { padding: 0 8px; text-align: right; white-space: nowrap; }
td.l { text-align: left; color: var(--muted); }
td:last-child { padding-right: 16px; }

.pcard-big { position: sticky; top: 16px; background: var(--panel); border: 3px solid var(--yel); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 0 22px rgba(255, 210, 63, 0.25); }
.big-name { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--panel2); border-radius: 10px; padding: 10px 12px; }
.tile-k { font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.tile-v { margin-top: 8px; font-family: var(--display); font-size: 21px; }
.bars-head { display: flex; justify-content: space-between; align-items: baseline; }
.bars-head h3 { margin: 0; font-family: var(--pixel); font-size: 10px; font-weight: 400; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 0 4px; border-bottom: 2px solid var(--line2); }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 17px; font-weight: 700; }
.bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; }
.grid4 { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.grid4 > div { background: var(--panel2); border-radius: 8px; padding: 8px; }
.grid4 dt { font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.grid4 dd { margin: 6px 0 0; font-size: 22px; font-weight: 700; }
.note { background: var(--panel2); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Scoreboard */
.score-wrap { display: flex; flex-direction: column; gap: 18px; }
.board { background: #000; border: 4px solid var(--blu); border-radius: 14px; padding: 20px 22px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; box-shadow: 0 0 26px rgba(61, 139, 255, 0.35); }
.board-total { font-family: var(--pixel); font-size: clamp(36px, 7vw, 64px); line-height: 1; color: var(--yel); text-shadow: 0 0 14px rgba(255, 210, 63, 0.55); }
.empty { background: var(--panel); border: 3px dashed var(--line2); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; font-size: 20px; }
.empty code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; background: var(--bg); padding: 4px 8px; border-radius: 4px; }

/* Callout */
.callout { position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-6deg); z-index: 50; pointer-events: none; font-family: var(--display); font-size: clamp(40px, 8vw, 104px); line-height: 1; white-space: nowrap; }
.callout.pop { animation: pop 1.3s ease-out forwards; }
@keyframes pop { 0% { transform: translate(-50%, -50%) rotate(-6deg) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -50%) rotate(-6deg) scale(1.08); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-6deg) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .callout.pop { animation: none; } .cap-fill { transition: none; } }

@media (max-width: 900px) {
  .stats-layout { grid-template-columns: minmax(0, 1fr); }
  .pcard-big { position: static; order: -1; }
  .table-box { max-height: none; }
}

/* ---------- Phase 3: fill bar, filters, list view, injury tags ---------- */
.fillbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border: 3px solid var(--yel); border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.fb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-money, .fb-meter { display: none; }   /* phones only (see the 700px block) */
.fb-chip .ck { margin-left: .4em; }
.fb-chip { min-height: 40px; min-width: 52px; padding: 0 10px; border-radius: 8px; border: 2px dashed var(--line2); background: transparent; color: var(--muted); font-family: var(--pixel); font-size: 10px; }
.fb-chip.has { border-style: solid; border-color: var(--blu); color: var(--soft); }
.fb-chip[aria-pressed="true"] { background: var(--yel); border: 2px solid var(--yel); color: var(--bg); }
.fb-info { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 17px; color: var(--soft); align-items: baseline; }
.fb-info b { font-family: var(--display); font-weight: 400; }
.fb-now { font-family: var(--pixel); font-size: 11px; }
.fb-now b { font-family: var(--pixel); }
.filters { display: flex; flex-direction: column; gap: 10px; }
.filters .search { max-width: none; }
.filters select.search { flex: 0 1 220px; }
.tog { min-height: 44px; padding: 0 12px; border-radius: 8px; border: 2px solid var(--line2); background: transparent; color: var(--muted); font-family: var(--pixel); font-size: 9px; white-space: nowrap; }
.tog[aria-pressed="true"] { border-color: var(--blu); background: rgba(61, 139, 255, 0.18); color: var(--text); }
.segs { display: inline-flex; border: 2px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg-b { min-height: 40px; padding: 0 12px; border: none; background: transparent; color: var(--muted); font-family: var(--pixel); font-size: 9px; }
.seg-b + .seg-b { border-left: 2px solid var(--line2); }
.seg-b[aria-pressed="true"] { background: var(--blu); color: var(--bg); }
.inj { display: inline-block; vertical-align: middle; font-family: var(--pixel); font-size: 8px; padding: 3px 5px; border-radius: 4px; margin-left: 2px; }
.inj-out { background: var(--red); color: var(--bg); }
.inj-gtd { background: var(--yel); color: var(--bg); }
.is-out { opacity: 0.6; }
.pc-line b { font-weight: 700; }

.plist { display: flex; flex-direction: column; gap: 6px; }
.prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 96px 70px 70px 80px 190px 112px; gap: 12px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.prow.on { border-color: var(--blu); }
.pr-id { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.pr-id .sub { flex-basis: 100%; font-size: 15px; }
.pr-name { background: none; border: none; padding: 0; text-align: left; font-size: 20px; font-weight: 700; line-height: 1.15; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-name:hover { text-decoration: underline; }
.pr-price { font-family: var(--display); font-size: 19px; white-space: nowrap; }
.pr-price .chg { display: block; font-size: 13px; text-align: left; }
.pr-n { display: flex; flex-direction: column; align-items: flex-end; }
.pr-n span { font-family: var(--pixel); font-size: 8px; color: var(--muted); }
.pr-n b { font-size: 20px; }
.pr-stats { font-size: 15px; color: var(--muted); white-space: nowrap; }
.pr-btn { min-height: 40px; font-size: 9px; }

@media (max-width: 1100px) {
  .prow { grid-template-columns: 44px minmax(0, 1fr) 90px 64px 64px 72px 104px; }
  .pr-stats { display: none; }
}
/* Phones: the fill bar docks to the bottom of the screen; list rows fold into two lines. */
@media (max-width: 700px) {
  .fillbar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-radius: 12px 12px 0 0; border-width: 3px 0 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  .fb-chips { width: 100%; flex-wrap: nowrap; }
  .fb-chip { flex: 1; min-width: 0; padding: 0 4px; }
  .fb-info { font-size: 15px; gap: 2px 10px; }
  body { padding-bottom: 130px; }
  /* Nov 26: the money is the headline on phones: CAP LEFT · MAX <slot> (or average per open slot) · BONUS
     in big digits, a spending meter, then the slot chips in the thumb zone. The sentence is hidden. */
  .fillbar .fb-info { display: none; }
  .fb-money { display: grid; grid-template-columns: 1.15fr 1fr 0.8fr; gap: 6px; width: 100%; }
  .fbm { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--panel2); border-radius: 8px; padding: 5px 4px 6px; min-width: 0; }
  .fbm span { font-family: var(--pixel); font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .fbm b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.05; white-space: nowrap; }
  .fb-meter { display: block; width: 100%; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
  .fb-meter i { display: block; height: 100%; background: var(--yel); border-radius: 3px; transition: width .25s; }
  .fb-chip { min-height: 44px; position: relative; white-space: nowrap; }
  .fb-chip .ck { position: absolute; margin: 0; top: -6px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--blu); color: #fff; font-family: var(--body); font-size: 11px; line-height: 16px; text-align: center; }
  .slot-head { min-width: 40px; }
  /* Compact lineup on phones: empty slots are one short row, filled slots a tight row (no tall boxes). */
  .slots { grid-template-columns: 1fr; gap: 8px; }
  .slot { min-height: 0; padding: 8px 10px; gap: 6px; }
  .slot:not(.is-filled) { flex-direction: row; align-items: center; }
  .slot:not(.is-filled) .slot-head { flex: 0 0 auto; }
  .slot:not(.is-filled) .slot-head .muted { display: none; }
  .slot:not(.is-filled) .slot-empty { min-height: 44px; flex: 1; text-align: center; }
  .slot-empty small { display: none; }
  .slot.bench .bench-meter { display: none; }
  .slot.is-filled { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "head who price" "live live live" "act act act"; align-items: center; gap: 6px 10px; }
  .slot.is-filled .slot-head { grid-area: head; }
  .slot.is-filled .slot-head .muted { display: none; }
  .slot.is-filled .who { grid-area: who; min-width: 0; }
  .slot.is-filled .slot-price { grid-area: price; flex-direction: column; align-items: flex-end !important; gap: 0 !important; }
  .slot.is-filled .slot-price .price { font-size: 20px; }
  .slot.is-filled .slot-live { grid-area: live; }
  .slot.is-filled .slot-actions { grid-area: act; }
  .slot.is-filled .slot-actions .btn { min-height: 40px; }
  .filters .toolbar-group > * { flex: 1 1 140px; }
  .prow { grid-template-columns: 44px repeat(3, minmax(0, 1fr)) 104px; grid-template-areas: "av id id id price" "n1 n1 n2 n3 btn"; gap: 6px 8px; padding: 8px 10px; }
  .pr-av { grid-area: av; } .pr-id { grid-area: id; } .pr-price { grid-area: price; text-align: right; }
  .pr-price .chg { text-align: right; }
  .n1 { grid-area: n1; } .n2 { grid-area: n2; } .n3 { grid-area: n3; }
  .pr-n { flex-direction: column; gap: 2px; align-items: center; background: var(--panel2); border-radius: 6px; padding: 4px 4px; min-width: 0; }
  .pr-n b { font-size: 16px; }
  .pr-n span { white-space: nowrap; font-size: 7px; }
  .pr-stats { display: none; }
  .pr-btn { grid-area: btn; min-height: 36px; }
}

/* Phase 3 polish: FILTERS button (phones only), segment and button sizing. */
.filters-btn { display: none; }
.segs .seg-b { flex: 1; }
.pr-btn { white-space: nowrap; }
@media (max-width: 700px) {
  .filters-btn { display: inline-block; flex: 0 0 auto !important; }
  .filters:not(.open) .fx { display: none !important; }
  .filters .toolbar-group > .segs { flex: 1 1 100%; display: flex; }
  .pr-btn { padding: 0 4px; }
  .prow .pr-n { min-width: 0; }
}

/* ---------- Phase 4: account, leagues, leaderboards, live ---------- */
.acct { min-height: 44px; padding: 0 14px; border-radius: 8px; border: 2px solid var(--yel); background: transparent; color: var(--yel); font-family: var(--pixel); font-size: 10px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct.on { border-color: var(--blu); color: var(--text); }
.acct:not([hidden]) + .sound { margin-left: 0; }
nav .acct { margin-left: auto; }
.sync { font-size: 15px; color: var(--muted); min-height: 18px; }
.sync.red, .red { color: var(--red); }
.linkish { background: none; border: none; padding: 0; color: var(--blu); text-decoration: underline; font: inherit; }

.modal { border: 4px solid var(--blu); border-radius: 14px; background: var(--panel); color: var(--text); padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 0 40px rgba(61, 139, 255, 0.4); }
.modal::backdrop { background: rgba(11, 11, 18, 0.8); }
.m-box { position: relative; padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 14px; font-size: 19px; }
.m-box h2 { padding-right: 36px; }
.m-box p { margin: 0; }
.m-form { display: flex; flex-direction: column; gap: 10px; }
.m-form label { font-family: var(--pixel); font-size: 10px; color: var(--soft); }
.m-form .search { max-width: none; width: 100%; flex: none; }
.m-form .btn { min-height: 52px; font-size: 11px; }
.m-msg { font-size: 18px; }
.m-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 8px; border: 2px solid var(--line2); background: transparent; color: var(--muted); font-size: 18px; }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.leagues-wrap { display: flex; flex-direction: column; gap: 16px; }
.lb-scopes { gap: 8px; }
.lb-periods { align-self: flex-start; }
.lb-note { margin: 0; font-size: 16px; }
.invite { background: var(--panel); border: 3px solid var(--yel); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.invite > div:first-child { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.invite p { margin: 0; }
.invite .code { font-family: var(--pixel); font-size: 14px; letter-spacing: 2px; }
.invite-link { max-width: none; width: 100%; font-size: 15px; }
.lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lb-row { background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 12px 16px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.lb-row.me { border-color: var(--blu); }
.lb-rank { font-family: var(--pixel); font-size: 18px; color: var(--soft); text-align: center; }
.lb-row:first-child .lb-rank { color: var(--yel); }
.lb-who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lb-score { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.lb-score b { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; }
.bdgs { display: flex; flex-wrap: wrap; gap: 6px; }
.bdg { font-family: var(--pixel); font-size: 8px; padding: 4px 6px; border-radius: 4px; background: var(--yel); color: var(--bg); }
.bdg-week { background: var(--blu); }
.bdg-month { background: var(--red); }
.bdg-season { background: var(--text); }
.live-tag { font-family: var(--pixel); font-size: 8px; padding: 3px 5px; border-radius: 4px; background: var(--red); color: var(--bg); vertical-align: middle; }
.live-tag.blink { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .live-tag.blink { animation: none; } }
.live-fp { font-family: var(--display); color: var(--red); font-size: 18px; }
.slot-live { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 16px; }
.slot-live .live-fp { font-size: 26px; line-height: 1; }
.gstat { font-family: var(--pixel); font-size: 8px; color: var(--muted); border: 1px solid var(--line2); border-radius: 4px; padding: 2px 4px; }
.gstat.on { color: var(--red); border-color: var(--red); }
@media (max-width: 700px) {
  nav .tab { flex: 1 1 auto; padding: 0 10px; font-size: 10px; }
  nav .acct { margin-left: 0; flex: 1 1 auto; }
  .lb-row { grid-template-columns: 34px minmax(0, 1fr); padding: 10px 12px; }
  .lb-score { grid-column: 2; flex-direction: row; align-items: baseline; gap: 10px; justify-content: flex-start; }
}

/* Phase 5: avatars, header rank chip, World Rankings, league list and page */
/* Under the logo: my rank chip + the World Rankings button (not a tab: it's about where I stand). */
.hdr-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hdr-row:not(:has(> :not([hidden]))) { display: none; }
.world-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 3px solid var(--yel);
  border-radius: 12px; background: var(--panel); color: var(--yel); font-family: var(--pixel); font-size: 10px; }
.world-btn:hover { background: var(--panel2); }
.world-btn[aria-pressed="true"] { background: var(--yel); color: var(--bg); }
.world-btn .trophy { flex: none; image-rendering: pixelated; }
/* MY TEAM: LAST NIGHT | TONIGHT */
.night-segs { align-self: flex-start; margin-bottom: 14px; }
.night-segs .seg-b { min-height: 48px; padding: 0 16px; font-size: 11px; white-space: nowrap; }
.night-segs .seg-b i { font-style: normal; opacity: 0.75; font-size: 9px; margin-left: 6px; }
@media (max-width: 700px) {
  .night-segs { display: flex; width: 100%; }
  .night-segs .seg-b { flex: 1; padding: 6px 8px; font-size: 10px; }
  .night-segs .seg-b i { display: block; margin: 4px 0 0; }
}
.ava { display: block; flex: none; border-radius: 6px; image-rendering: pixelated; }
.rank-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 6px;
  border: 3px solid var(--blu); border-radius: 12px; background: var(--panel); font-family: var(--pixel); font-size: 10px; max-width: 100%; }
.rank-chip:not(:has(.ava)) { padding: 0 14px; border-color: var(--yel); color: var(--yel); }
.rank-chip .rc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rank-chip .rc-dot { color: var(--muted); }
.rank-chip .rc-rank { color: var(--yel); white-space: nowrap; }
.rank-chip { cursor: pointer; }
.rank-chip:hover { background: var(--panel2); }
.rank-chip .rc-team { white-space: nowrap; }
.rank-chip[aria-pressed="true"] { border-color: var(--yel); background: var(--panel2); }
.rank-chip.big { font-size: 13px; gap: 12px; padding: 8px 18px 8px 8px; box-shadow: 4px 4px 0 var(--red); }
.rank-chip.big .rc-rank { font-size: 15px; }
.up, .down { font-family: var(--body); font-weight: 700; font-size: 1.6em; line-height: 1; white-space: nowrap; }
.up { color: #7CFF6B; }
.down { color: var(--red); }
.world-me { background: var(--panel); border: 3px solid var(--blu); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.world-me > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.world-me b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.world-me-rank { font-family: var(--pixel); font-size: 13px; color: var(--yel); }
.lb-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-name .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdg-w_night1 { background: var(--yel); }
.bdg-w_week10 { background: var(--blu); }
.bdg-w_month10 { background: var(--red); }
.lg-head { margin: 6px 0 0; font-family: var(--pixel); font-size: 11px; color: var(--muted); font-weight: 400; }
.lg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lg-card { text-align: left; background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.lg-card:hover { border-color: var(--line2); }
.lg-card.mine { border-color: var(--yel); }
.lg-name { font-family: var(--display); font-size: 24px; color: var(--text); overflow-wrap: anywhere; }
.lg-lead { font-size: 17px; }
.back { align-self: flex-start; font-family: var(--pixel); font-size: 10px; text-decoration: none; min-height: 40px; }
.invite-box { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 2px solid var(--line); }
.invite-box .invite { flex-direction: column; align-items: stretch; }
.invite-box .invite .invite-link { flex: none; min-height: 44px; }
.invite-box .invite .m-actions { justify-content: flex-start; }
.ava-pick { border: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ava-pick legend { font-family: var(--pixel); font-size: 10px; color: var(--soft); margin-bottom: 8px; padding: 0; }
.ava-opt { display: flex; justify-content: center; padding: 4px; border: 3px solid transparent; border-radius: 10px; cursor: pointer; }
.ava-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ava-opt:has(input:checked) { border-color: var(--yel); background: var(--panel2); }
.ava-opt:has(input:focus-visible) { outline: 3px solid var(--yel); outline-offset: 2px; }
.ava-opt .ava { width: 40px; height: 44px; }
.m-who { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.m-who h2 { padding-right: 0; }
@media (max-width: 700px) {
  .rank-chip.big { font-size: 11px; }
  .rank-chip.big .rc-rank { font-size: 12px; }
  .rank-chip, .rank-chip.big { max-width: calc(100vw - 32px); gap: 8px; }
  .rank-chip .rc-dot { display: none; }
  .rank-chip.big { font-size: 10px; }
  .rank-chip.big .rc-rank { font-size: 11px; }
  .rank-chip .rc-name { flex: 1 1 auto; min-width: 3.5em; }
  .rank-chip .rc-rank, .rank-chip .up, .rank-chip .down { flex: none; }
  .ava-pick { grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .ava-opt { padding: 2px; border-width: 2px; }
}

/* Sound panel (SOUND button) and the hidden #soundtest list */
.sound-panel { background: var(--panel); border: 3px solid var(--line2); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; margin-top: -10px; }
.snd-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.snd-vol { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; }
.snd-vol input { flex: 1; accent-color: var(--yel); min-height: 32px; }
.snd-test { display: flex; flex-direction: column; gap: 8px; }
.snd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.snd-grid .btn { font-size: 9px; min-height: 44px; }

/* Shared by MY TEAM and the league boards */
.sb-note { margin: 0; font-size: 16px; }
.pr-slot { font-family: var(--pixel); font-size: 9px; color: var(--yel); flex: none; }
.gstat.fin { color: var(--soft); }
.pr-bar { height: 8px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 2px; overflow: hidden; }
.pr-bar i { display: block; height: 100%; background: var(--yel); }

/* League boards: other players' lineups as compact chips (Phase 6) */
.mini { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-c { display: inline-flex; align-items: center; gap: 5px; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px 2px 5px; font-size: 15px; min-height: 28px; max-width: 100%; }
.mini-c i { font-style: normal; font-family: var(--pixel); font-size: 7px; color: var(--muted); }
.mini-c img { width: 20px; height: 20px; image-rendering: pixelated; border-radius: 3px; }
.mini-c b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.mini-c em { font-style: normal; color: var(--yel); }
.mini-c.hot { border-color: var(--red); }
.mini-c.hot em { color: var(--red); }
.mini-c.hid b { font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.mini-c.empty { color: var(--line2); }
.lb-row { padding: 10px 14px; }

.lb-detail { grid-column: 1 / -1; min-width: 0; }

.snd-pair { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; background: var(--panel2); border-radius: 8px; padding: 6px 8px; }
.snd-pair span { font-size: 16px; }
.snd-pair .btn { font-size: 8px; min-height: 40px; padding: 0 10px; }
.snd-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.snd-pair .star { font-family: var(--body); font-style: normal; font-size: 15px; }

/* League Tonight table: one row per team, PG–C columns (Phase 6c) */
.lt-wrap { margin: 0 -2px; }
.lt { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0 4px; table-layout: fixed; font-size: inherit; }
.lt td, .lt th { text-align: left; white-space: normal; }
.lt td:last-child { padding-right: 8px; }
.lt-c0 { width: 170px; }
.lt-h { position: sticky; top: 0; z-index: 2; background: var(--bg); font-family: var(--pixel); font-size: 9px; font-weight: 400; color: var(--yel); text-align: left; padding: 8px 8px 4px; }
.lt-team { background: var(--panel); border: 2px solid var(--line); border-right: none; border-radius: 10px 0 0 10px; padding: 0; text-align: left; font-weight: 400; }
.lt-tb { width: 100%; display: flex; align-items: center; gap: 7px; padding: 6px 8px; background: none; border: none; text-align: left; min-height: 64px; }
.lt-rank { font-family: var(--pixel); font-size: 11px; color: var(--soft); width: 16px; flex: none; }
.lt-row:first-child .lt-rank { color: var(--yel); }
.lt-who { display: flex; flex-direction: column; min-width: 0; }
.lt-name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-score { display: flex; align-items: baseline; gap: 5px; }
.lt-score b { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--yel); line-height: 1; }
.lt-score i { font-style: normal; font-size: 12px; color: var(--muted); }
.pc { background: var(--panel2); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); border-left: 1px solid var(--line); padding: 5px 8px; vertical-align: top; cursor: pointer; }
.pc:last-child { border-right: 2px solid var(--line); border-radius: 0 10px 10px 0; }
.pc.none { cursor: default; color: var(--muted); font-size: 15px; vertical-align: middle; border-right: 2px solid var(--line); border-radius: 0 10px 10px 0; }
.pc.hid, .pc.empty { cursor: default; }
.pc:hover:not(.hid):not(.none):not(.empty), .pc:focus-visible { background: #26264a; }
.pc.hot { background: #2a1520; }
.lt-row.me .lt-team, .lt-row.me .pc { border-top-color: var(--blu); border-bottom-color: var(--blu); }
.lt-row.me .lt-team { border-left-color: var(--blu); }
.lt-row.me .pc:last-child, .lt-row.me .pc.none { border-right-color: var(--blu); }
.pc-name { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-fp { display: flex; align-items: center; gap: 2px; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.05; color: var(--yel); }
.pc.hot .pc-fp { color: var(--red); }
.pc-fp .flame { color: var(--red); width: 16px; height: 16px; }
.pc-q { display: block; font-family: var(--pixel); font-size: 13px; color: var(--line2); margin: 4px 0; }
.pc-bar { display: block; height: 4px; background: var(--bg); border: 1px solid var(--line2); margin: 2px 0; }
.pc-bar i { display: block; height: 100%; background: var(--yel); }
.pc.hot .pc-bar i { background: var(--red); }
.pc-sub { display: flex; justify-content: space-between; gap: 4px; font-size: 12px; color: var(--muted); }
.pc-st { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-st.on { color: var(--red); }
.lt-detail td { padding: 0 0 6px 24px; }
.pc-pop { position: fixed; z-index: 50; width: 270px; background: var(--panel); border: 2px solid var(--yel); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.pp-top { display: flex; gap: 10px; align-items: center; }
.pp-top img { width: 44px; height: 44px; image-rendering: pixelated; border-radius: 6px; border: 2px solid var(--text); }
.pp-top div { display: flex; flex-direction: column; }
.pp-top b { font-size: 18px; }
.pp-top span { font-size: 14px; color: var(--muted); }
.pp-num b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.pp-line { font-size: 14px; color: var(--muted); }
.pp-line b { color: var(--text); font-weight: 600; }
@media (max-width: 767px) {
  .lt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .lt { min-width: 640px; }
  .lt-c0 { width: 132px; }
  .lt-team, .lt-h:first-child { position: sticky; left: 0; z-index: 3; }
  .lt-h:first-child { z-index: 4; }
  .lt-tb { gap: 5px; padding: 5px 6px; }
  .lt-name { font-size: 15px; }
  .lt-score i { display: none; }
  .lt-detail td { padding-left: 0; }
}

/* ---------- Arcade pass (Nov 8): sticky control deck, arcade cards, sortable list, bigger PLAYERS table ---------- */
/* Control deck: fill bar + filters (+ list column headers) stay pinned to the top while scrolling the free agents. */
.deck { position: sticky; top: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; gap: 8px; padding: 8px 0 10px; margin: -8px 0 -10px; border-bottom: 2px solid var(--line); }
.deck .search { min-height: 42px; height: 42px; }
.deck .tog, .deck .seg-b { min-height: 40px; }
@media (min-width: 701px) {
  .deck .fillbar { position: static; box-shadow: none; padding: 6px 10px; }
  .deck .filters { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
  .deck .filters .toolbar-group { display: contents; }
  .deck .filters #poolSearch { flex: 1 1 240px; max-width: none; }
  .deck .filters select.search { flex: 0 1 190px; }
}
@media (max-width: 700px) {
  .deck .filters.open { max-height: 62vh; overflow: auto; }
}

/* Arcade cards */
.pool { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.acard { background: var(--panel); border: 3px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.acard.on { border-color: var(--blu); }
.ac-top { display: flex; gap: 12px; align-items: center; padding: 10px; border-bottom: 3px solid rgba(0, 0, 0, 0.4); }
.ac-top .jersey { box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45); }
.ac-id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ac-name { margin: 0; width: 100%; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; color: #fff; text-transform: uppercase; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55); }
.ac-sub { font-size: 17px; font-weight: 600; color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); }
.ac-price { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 0; }
.ac-price .lab, .ac-boxes span, .ac-digits span { font-family: var(--pixel); font-size: 8px; color: var(--muted); }
.ac-price .chg { display: inline; font-size: 15px; margin-right: auto; }
.ac-price b { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; padding: 0 4px; border-radius: 6px; }
.ac-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 12px 0; }
.ac-boxes > div { background: var(--bg); border: 2px solid var(--line); border-radius: 8px; padding: 7px 4px 6px; text-align: center; display: flex; flex-direction: column; gap: 5px; }
.ac-boxes b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; }
.ac-digits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 10px 12px; text-align: center; }
.ac-digits > div { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; border-radius: 6px; }
.ac-digits b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1; }
.ac-boxes > div.on, .ac-digits > div.on, .ac-price b.on { box-shadow: inset 0 0 0 2px var(--yel); background: rgba(255, 210, 63, 0.1); }
.acard .row-btns { padding: 0 12px 12px; margin-top: auto; }
.acard .row-btns .btn { min-height: 46px; }

/* LIST view: fixed columns, same order on every row; headers sort. */
.plist { display: flex; flex-direction: column; gap: 4px; }
.lhead, .lrowp { display: flex; align-items: center; gap: 8px; }
.lhead { background: var(--panel2); border: 2px solid var(--line2); border-radius: 8px; padding: 0 12px; min-height: 42px; }
.lrowp { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 5px 12px; min-height: 60px; }
.lrowp:nth-child(even) { background: #19192d; }
.lrowp.on { border-color: var(--blu); }
.lc-av { flex: 0 0 44px; }
.lc-name { flex: 1 1 0; min-width: 0; }
.lhead .lc-name { font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.lc-name .pr-name { font-size: 20px; }
.lc-name .sub { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc { flex: 0 0 74px; text-align: right; font-family: var(--display); font-size: 21px; white-space: nowrap; padding: 4px 6px; border-radius: 6px; }
.lc.c-price { flex-basis: 92px; }
.lrowp .lc.on { background: rgba(255, 210, 63, 0.1); }
.lhead .lc { font-family: var(--pixel); font-size: 9px; color: var(--muted); background: none; border: 0; min-height: 34px; }
.lhead .lc:hover { color: var(--text); }
.lhead .lc.on { color: var(--bg); background: var(--yel); }
.lc-btn, .lrowp .pr-btn { flex: 0 0 108px; }
@media (max-width: 1100px) { .lc.k-hide:not(.on) { display: none; } }
@media (max-width: 700px) {
  .lhead, .lrowp { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .lc { flex-basis: 52px; font-size: 17px; padding: 4px 2px; }
  .lc.c-price { flex-basis: 64px; }
  .lhead .lc { font-size: 7px; }
  .lc-btn, .lrowp .pr-btn { flex-basis: 70px; }
  .lc-av { flex-basis: 40px; }
  .lhead, .lrowp { flex-wrap: wrap; justify-content: flex-end; row-gap: 2px; }
  .lc-name { flex: 1 1 calc(100% - 48px); }
  .lc-name .pr-name { font-size: 18px; }
  .lc-name .sub { font-size: 14px; }
  .lhead .lc-av, .lhead .lc-name { display: none; }
}

/* PLAYERS tab: bigger, scoreboard-style numbers; the sorted column lights up. */
table { font-size: 20px; }
tbody td { height: 50px; }
tbody tr:nth-child(even), tbody tr:nth-child(even) th { background: #19192d; }
tbody tr.sel, tbody tr.sel th { background: #2A2A48; }
td.k { font-family: var(--display); font-size: 20px; }
td.on { background: rgba(255, 210, 63, 0.1); }
.sortbtn { font-size: 11px; }
.sortbtn:hover { color: var(--text); }
.sortbtn.on { background: var(--yel); color: var(--bg); }
.pcard-big .ac-top { margin: -18px -18px 0; border-radius: 11px 11px 0 0; padding: 14px; }
.pcard-big .ac-name { font-size: 26px; }
.tile-v { font-size: 24px; white-space: nowrap; }

/* ---------- MY TEAM + league boards, arcade pass (Nov 8) ---------- */
/* Summary: big final score box, then projected / rank boxes. */
.mt-sum { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.ms-box { background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 120px; text-align: center; }
.ms-box > span { font-family: var(--pixel); font-size: 8px; color: var(--muted); line-height: 1.4; }
.ms-box > b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; }
.ms-box > em { font-style: normal; font-size: 15px; color: var(--muted); }
.ms-box > em.up { color: #3DDC84; } .ms-box > em.down { color: var(--red); }
.ms-rank > b { color: var(--yel); }
.ms-final { background: #000; border-color: var(--blu); box-shadow: 0 0 20px rgba(61, 139, 255, 0.3); align-items: flex-start; text-align: left; min-width: 260px; }
.ms-final > b { font-family: var(--pixel); font-size: clamp(32px, 5vw, 50px); color: var(--yel); text-shadow: 0 0 12px rgba(255, 210, 63, 0.5); }
.ms-final .ms-math { font-size: 18px; color: var(--soft); }
.ms-final .ms-math i { font-style: normal; font-family: var(--display); color: var(--blu); }
.ms-btn { margin-left: auto; align-self: center; font-size: 10px; min-height: 48px; padding: 0 16px; }

/* Scores of my players' games */
.gstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 210px)); gap: 8px; }
.gchip { background: var(--panel2); border: 2px solid var(--line); border-radius: 8px; padding: 6px 10px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; }
.gchip.on { border-color: var(--red); }
.gc-t { display: flex; gap: 8px; grid-column: 1; }
.gc-t i { width: 36px; }
.gc-t b { min-width: 38px; text-align: right; }
.gc-t i { font-style: normal; font-family: var(--pixel); font-size: 10px; color: var(--soft); align-self: center; }
.gc-t b { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.1; color: var(--muted); }
.gc-t.w b, .gchip.on .gc-t b { color: var(--text); }
.gc-st { grid-column: 2; grid-row: 1 / 3; justify-self: end; font-family: var(--pixel); font-size: 8px; color: var(--muted); white-space: nowrap; }
.gchip.on .gc-st { color: var(--red); }

/* Box score: every row is the same grid, so columns line up; the PLAYER column stays put when it scrolls sideways. */
.mt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.mt { --mt-cols: minmax(210px, 1fr) 92px 62px 62px 84px 64px 46px 50px 48px 48px 44px 44px 44px 66px 62px 58px 50px 38px;
  min-width: 1230px; display: flex; flex-direction: column; gap: 4px; }
.mt-head, .mt-row { display: grid; grid-template-columns: var(--mt-cols); column-gap: 3px; align-items: center; }
.mt-head { background: var(--panel2); border: 2px solid var(--line2); border-radius: 8px; min-height: 36px; padding: 0 8px; }
.mt-head > span { font-family: var(--pixel); font-size: 8px; color: var(--muted); }
.mt-head .mt-who { background: var(--panel2); }
.mt-row { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 5px 8px; min-height: 64px; }
.mt-row[data-act] { cursor: pointer; }
.mt-row[data-act]:hover { background: #1b1b30; }
.mt-row[data-act]:hover .mt-who { background: #1b1b30; }
.mt-row.hot { border-color: var(--red); }
.mt-row.open { border-color: var(--blu); }
.mt-who { position: sticky; left: 0; z-index: 1; background: var(--panel); display: flex; align-items: center; gap: 10px; min-width: 0; height: 100%; border: 0; padding: 0 6px 0 0; text-align: left; }
button.mt-who:hover .mt-name { color: var(--yel); }
.mt-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-top { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.mt-name { font-size: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-sub { font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mc { text-align: right; font-family: var(--display); font-weight: 400; font-size: 20px; white-space: nowrap; padding: 0 3px; }
.mt-head .mc, .mt-head .mc.mb { font-family: var(--pixel); font-size: 8px; color: var(--muted); }
.mc.mb { font-size: 18px; color: var(--soft); }
.mc.mb-min { border-left: 2px solid var(--line2); }
.mc.mb.neg { color: #FF8A80; }
.mt-row .mc-fp { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.mc-fp b { font-weight: 400; font-size: 25px; line-height: 1; display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.mc-fp b .flame { color: var(--red); width: 18px; height: 18px; }
.mc-fp .pr-bar { height: 6px; }
.mt-row.hot .pr-bar i { background: var(--red); }
.mt-tot { min-height: 48px; background: var(--panel2); border-style: dashed; }
.mt-tot .mt-who { background: var(--panel2); }
.mt-tot .mt-name { font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.mt-tot .mc.mb { color: var(--text); }
.mt-hid { display: flex; min-height: 48px; gap: 12px; opacity: 0.8; }
.mt-hid .mt-who { flex: 0 0 auto; }
.mt-q { width: 32px; height: 32px; border-radius: 5px; border: 2px dashed var(--line2); display: flex; align-items: center; justify-content: center; font-family: var(--pixel); font-size: 11px; color: var(--muted); }
.mt-hid .mt-name { font-family: var(--pixel); font-size: 9px; color: var(--soft); }
.mt-hidtxt { font-size: 16px; color: var(--muted); }
/* Where his points came from (tap a player) */
.mt-break { position: sticky; left: 0; width: min(100%, calc(100vw - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--panel2); border: 2px solid var(--blu); border-top: 0; border-radius: 0 0 8px 8px; margin-top: -8px; padding: 12px 12px 10px; }
.fpb { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 5px 8px; }
.fpb i { font-style: normal; font-family: var(--pixel); font-size: 7px; color: var(--muted); }
.fpb b { font-family: var(--display); font-weight: 400; font-size: 19px; color: #3DDC84; }
.fpb b.neg { color: #FF8A80; }
.fpb.tot { border-color: var(--yel); }
.fpb.tot b { color: var(--yel); }
.fpb-op { font-family: var(--display); color: var(--muted); }
.fpb-avg { flex-basis: 100%; font-size: 15px; }
@media (max-width: 700px) {
  .mt { --mt-cols: 150px 74px 54px 54px 70px 54px 40px 44px 42px 42px 38px 38px 38px 58px 54px 50px 44px 34px; min-width: 0; width: max-content; }
  .mt-row { padding: 5px 6px; min-height: 58px; }
  .mt-head { padding: 0 6px; }
  .mt-who { gap: 6px; }
  .mt-who .jersey { display: none; }
  .mt-name { font-size: 17px; }
  .mt-sub { font-size: 13px; flex-wrap: wrap; white-space: normal; }
  .mc { font-size: 18px; } .mc.mb { font-size: 16px; } .mc-fp b { font-size: 21px; }
  .ms-box { min-width: 0; flex: 1 1 90px; padding: 8px 10px; }
  .ms-box > b { font-size: 26px; }
  .ms-final { flex-basis: 100%; }
  .ms-btn { flex-basis: 100%; margin-left: 0; }
  .gstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-final .ms-math { font-size: 14px; }
  .ms-final > b { font-size: 34px; }
}

/* League / world Tonight + Last night table: arcade cells */
.lt { border-spacing: 0 6px; }
.lt-h { background: var(--panel2); color: var(--muted); font-size: 9px; padding: 11px 8px; border-top: 2px solid var(--line2); border-bottom: 2px solid var(--line2); }
.lt-h:first-child { border-left: 2px solid var(--line2); border-radius: 8px 0 0 8px; }
.lt-h:last-child { border-right: 2px solid var(--line2); border-radius: 0 8px 8px 0; }
.lt-tb { min-height: 86px; gap: 9px; }
.lt-rank { font-size: 14px; width: 22px; }
.lt-name { font-size: 19px; }
.lt-score b { font-size: 28px; }
.lt-score { flex-direction: column; align-items: flex-start; gap: 2px; }
.lt-score i { font-size: 13px; }
.lt-row.open .lt-team, .lt-row.open .pc { border-bottom-color: var(--blu); }
.lt-row.lead .lt-team, .lt-row.lead .pc { border-top-color: var(--yel); border-bottom-color: var(--yel); }
.lt-row.lead .lt-team { border-left-color: var(--yel); box-shadow: inset 4px 0 0 var(--yel); }
.lt-row.lead .pc:last-child, .lt-row.lead .pc.none { border-right-color: var(--yel); }
.lt-row.lead .lt-rank { color: var(--yel); }
.pc { padding: 7px 9px; }
.tc-head { display: flex; align-items: center; gap: 7px; min-width: 0; margin-bottom: 4px; }
.tc-id { display: flex; flex-direction: column; min-width: 0; }
.jersey.xs { width: 42px; height: 42px; font-size: 14px; border-width: 1px; border-radius: 6px; }
.pc .pc-name { font-size: 17px; font-weight: 600; }
.pc-fp { font-size: 27px; }
.pc-bar { height: 6px; margin: 4px 0; border-radius: 2px; overflow: hidden; }
.pc-sub { font-size: 13px; }
.lt-detail td { padding: 0 0 10px 0; }
.lt-detail .mt-scroll { border-left: 3px solid var(--blu); padding-left: 8px; }
@media (max-width: 767px) {
  .lt { min-width: 720px; }
  .lt-tb { min-height: 76px; }
  .lt-score b { font-size: 19px; }
  .lt-rank { font-size: 11px; width: 14px; }
  .lt-name { font-size: 15px; }
  .lt-detail .mt-scroll { padding-left: 4px; }
  .jersey.xs { width: 32px; height: 32px; font-size: 11px; }
  .pc .pc-name { font-size: 15px; }
  .pc-fp { font-size: 22px; }
  .lt-detail td { position: sticky; left: 0; }
}

/* League board: LIVE and PROJ scoreboard columns (Nov 8b) */
.lt-c1 { width: 118px; }
.lt-c2 { width: 136px; }
.lt-hn { text-align: right; }
.lt-num { background: #000; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); border-left: 1px solid var(--line); padding: 6px 10px; text-align: right; vertical-align: middle; white-space: nowrap; }
.lt-num b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.lt-num i { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 6px; }
.lt-num em { font-style: normal; font-size: 14px; color: var(--muted); margin-left: 2px; }
.lt-live b { color: var(--yel); text-shadow: 0 0 10px rgba(255, 210, 63, 0.35); }
.lt-proj b { color: var(--soft); }
.lt-proj i.on { color: var(--red); }
.lt-open { font-family: var(--pixel); font-size: 7px; color: var(--muted); margin-top: 6px; }
.lt-tb:hover .lt-open { color: var(--yel); }
.lt-row.me .lt-num { border-top-color: var(--blu); border-bottom-color: var(--blu); }
.lt-row.lead .lt-num { border-top-color: var(--yel); border-bottom-color: var(--yel); }
.lt-row.open .lt-num { border-bottom-color: var(--blu); }
.pc-fp.pre { color: var(--line2); }
.pc.hid { vertical-align: middle; text-align: center; background: repeating-linear-gradient(135deg, var(--panel2) 0 10px, #1a1a2e 10px 20px); }
.pc.hid .pc-q { font-size: 22px; color: var(--soft); margin: 2px 0 8px; }
.pc.hid .pc-st { font-family: var(--pixel); font-size: 7px; white-space: normal; line-height: 1.6; }
@media (max-width: 767px) {
  .lt { min-width: 860px; }
  .lt-c1, .lt-c2 { width: 92px; }
  .lt-num { padding: 6px 7px; }
  .lt-num b { font-size: 22px; }
  .lt-num i { font-size: 11px; white-space: normal; }
}

/* Latest winners: trophy badges next to the avatar (replaced the big WINNER boxes, Nov 8) */
.wbdg { display: inline-flex; align-items: center; gap: 4px; font-family: var(--pixel); font-size: 7px; line-height: 1; padding: 3px 5px; border-radius: 4px; background: var(--yel); color: var(--bg); white-space: nowrap; box-shadow: 0 0 8px rgba(255, 210, 63, 0.45); }
.wbdg-week, .wbdg-w_week10 { background: var(--blu); color: #fff; box-shadow: 0 0 8px rgba(61, 139, 255, 0.45); }
.wbdg-month, .wbdg-w_month10 { background: var(--red); color: #fff; box-shadow: 0 0 8px rgba(255, 74, 61, 0.45); }
.wbdg-season { background: var(--text); }
.lt-bdgs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.wbdg .ws { display: none; }
.lt-c0 { width: 200px; }
@media (max-width: 767px) {
  .lt-c0 { width: 140px; }
  .wbdg .wl { display: none; }
  .wbdg .ws { display: inline; }
}
.stats-tip { margin: 0; font-size: 15px; }

/* ---------- 6th Man in MY TEAM and the league boards ---------- */
.pr-slot.bn { background: #2FBF71; color: var(--bg); }
.bn-tag { display: block; margin-top: 3px; font-family: var(--pixel); font-size: 8px; line-height: 1.5; color: var(--muted); }
.bn-tag.in { color: #2FBF71; }
.bn-tag.out { color: var(--red); }
.mt-row.t-bench { opacity: 0.55; }
.mt-row.t-bench .mc-fp b { text-decoration: line-through; color: var(--muted); }
.mt-row.t-covered .mc-fp b { color: var(--muted); }
.mt-row.t-in { box-shadow: inset 4px 0 0 #2FBF71; }
.lt-h.bn { color: #2FBF71; }
.pc.t-bench { opacity: 0.5; }
.pc.t-covered { opacity: 0.6; }
.pc.t-in { box-shadow: inset 0 0 0 2px #2FBF71; }
.pc-tag { display: block; margin-top: 4px; font-family: var(--pixel); font-size: 7px; line-height: 1.4; color: var(--muted); }
.pc.t-in .pc-tag { color: #2FBF71; }
.pc.t-covered .pc-tag { color: var(--red); }

/* HOW TO PLAY fold-out above the footer */
.howto { background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.howto summary { cursor: pointer; font-family: var(--pixel); font-size: 11px; color: var(--yel); min-height: 28px; display: flex; align-items: center; }
.howto ul { margin: 10px 0 4px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.35; color: var(--soft); }
.howto b { color: var(--text); }

/* ---------- League chat (Nov 18): render-chat.js ---------- */
.chat { margin: 22px 0; background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 14px 16px; max-width: 760px; }
.chat .lg-head { margin-top: 0; }
.chat-list { list-style: none; margin: 0 0 12px; padding: 0 4px 0 0; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.cm { display: flex; gap: 10px; align-items: flex-start; }
.cm .ava { flex: none; }
.cm-main { min-width: 0; flex: 1; }
.cm-head { display: flex; align-items: baseline; gap: 8px; }
.cm-name { font-family: var(--pixel); font-size: 10px; color: var(--yel); }
.cm.mine .cm-name { color: var(--blu); }
.cm-time { font-size: 14px; color: var(--muted); }
.cm-body { font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.cm-del { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; min-width: 32px; min-height: 28px; cursor: pointer; }
.cm-del:hover { color: var(--red); }
.cm.game { flex-wrap: wrap; align-items: baseline; gap: 6px 10px; background: var(--bg); border: 2px dashed var(--line2); border-radius: 8px; padding: 8px 12px; }
.cm.game .cm-body { color: var(--yel); font-size: 17px; }
.cm.game .rx-bar { flex-basis: 100%; }
.cm-empty { padding: 18px 0; text-align: center; }
.chat-form { display: flex; gap: 10px; align-items: center; }
.chat-form .search { max-width: none; flex: 1; }
.chat-count { font-size: 14px; min-width: 2ch; }
/* Reactions: counts + a picker. Used on chat messages and on a team's row on the board. */
.rx-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.rx, .rx-add { min-height: 28px; padding: 0 8px; border-radius: 14px; border: 2px solid var(--line2); background: transparent; font-size: 15px; cursor: pointer; color: var(--text); }
.rx b { font-family: var(--pixel); font-size: 9px; margin-left: 4px; }
.rx.mine { border-color: var(--blu); background: rgba(61, 139, 255, 0.18); }
.rx-add { color: var(--muted); font-size: 13px; opacity: 0.75; }
.rx-add:hover, .rx-add[aria-expanded="true"] { opacity: 1; border-color: var(--yel); color: var(--yel); }
.rx-pick { position: absolute; z-index: 20; left: 0; top: calc(100% + 4px); display: flex; gap: 2px; background: var(--panel2); border: 2px solid var(--yel); border-radius: 10px; padding: 4px; box-shadow: 0 4px 0 #000; }
.rx-e { min-width: 40px; min-height: 40px; border: 0; background: none; font-size: 22px; border-radius: 8px; cursor: pointer; }
.rx-e:hover, .rx-e:focus-visible { background: var(--line); }
/* Unread: a dot on the LEAGUES tab, NEW CHAT on the league card. */
.tab.has-new { position: relative; }
.tab.has-new::after { content: ''; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
.new-chat { font-family: var(--pixel); font-size: 8px; color: var(--bg); background: var(--red); border-radius: 4px; padding: 3px 5px; vertical-align: middle; }
@media (max-width: 700px) {
  .chat { padding: 12px; margin: 16px 0; }
  .chat-list { max-height: 55vh; }
  .chat-form .btn { padding: 0 12px; }
}

/* ---------- Steal & bust, streaks, achievements (Nov 18): render-awards.js ---------- */
.aw-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 18px 0; max-width: 760px; }
.aw-box { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.aw-steal { border-color: #2FBF71; }
.aw-bust { border-color: #6FA8DC; }
.aw-name { font-size: 20px; }
.aw-name .muted { font-size: 15px; font-weight: normal; }
.aw-line { font-size: 17px; }
.aw-who { font-size: 15px; color: var(--soft); }
.rec-box { border-color: #FFD23F; box-shadow: 0 0 12px rgba(255, 210, 63, .25); }
.rec-box.rec-record { border-color: #B26BFF; box-shadow: 0 0 12px rgba(178, 107, 255, .25); }
.rec-score { font-family: var(--pixel, inherit); font-size: 30px; color: var(--yel, #FFD23F); line-height: 1.1; }
.rec-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 17px; }
.red { color: var(--red); }
.stk { display: inline-block; margin-left: 6px; font-family: var(--pixel); font-size: 9px; padding: 2px 4px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line2); vertical-align: middle; white-space: nowrap; }
.stk.heat { color: var(--red); border-color: var(--red); }
.stk.iron { color: var(--soft); }
.achs { margin: 26px 0 8px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ach { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 3px solid var(--line); border-radius: 12px; padding: 12px; opacity: 0.55; }
.ach.got { opacity: 1; border-color: var(--yel); }
.ach-ic { font-size: 28px; }
.ach b { font-family: var(--pixel); font-size: 10px; line-height: 1.5; }
.ach b i { color: var(--yel); font-style: normal; }
.ach .muted { font-size: 15px; }
.ach-now { font-family: var(--pixel); font-size: 8px; color: var(--blu); }
@media (max-width: 700px) { .ach-grid { grid-template-columns: 1fr 1fr; } }

/* Player card: NBA.com / ESPN profile links */
.prof-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-links .muted { font-size: 15px; margin-right: auto; }
.prof-links .btn { color: var(--text); min-height: 44px; font-size: 11px; text-decoration: none; display: inline-flex; align-items: center; }

/* MANAGE LEAGUE (owner / co-commissioners) */
.manage { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 2px solid var(--line2); border-radius: 10px; background: var(--panel); }
.manage .mg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mg-row { margin-top: 10px; }
.mg-sub { font-family: var(--pixel); font-size: 11px; margin: 4px 0 0; color: var(--soft); }
.mg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mg-p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: var(--panel2); border-radius: 8px; }
.mg-p b { font-size: 19px; }
.mg-tag { font-family: var(--pixel); font-size: 9px; padding: 4px 6px; border-radius: 4px; }
.mg-tag.own { background: var(--yel); color: var(--bg); }
.mg-tag.co { border: 1px solid var(--blu); color: var(--blu); }
.mg-acts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.mg-acts .btn { min-height: 38px; font-size: 9px; padding: 0 10px; }

/* ---------- Swag & LOCKER ROOM (Nov 19) ---------- */
.ava { border-radius: 6px; }
.ava.fr-rare { box-shadow: 0 0 0 2px #3D8BFF; }
.ava.fr-epic { box-shadow: 0 0 0 2px #B26BFF, 0 0 8px #B26BFF88; }
.ava.fr-legendary { box-shadow: 0 0 0 2px #FFD23F, 0 0 10px #FFD23F; animation: ava-shine 2.4s ease-in-out infinite; }
.ava.fr-goldframe { box-shadow: 0 0 0 3px #FFD23F, 0 0 0 5px #FF9F1C, 0 0 14px #FFD23F; animation: ava-shine 1.8s ease-in-out infinite; }
@keyframes ava-shine { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25) saturate(1.2); } }
@media (prefers-reduced-motion: reduce) { .ava.fr-legendary, .ava.fr-goldframe { animation: none; } }
.ava-btn { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; border-radius: 6px; }
.ava-btn:focus-visible { outline: 2px solid var(--yel); outline-offset: 2px; }
.lk-link { margin: 0 0 10px; min-height: 40px; font-size: 10px; }
.locker { display: flex; flex-direction: column; gap: 22px; }
.lk-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 20px; border-radius: 12px;
  background: linear-gradient(135deg, #1D1160 0%, #151525 55%, #3a1d5e 100%); border: 2px solid var(--line2); }
.lk-ava { line-height: 0; filter: drop-shadow(0 6px 18px #0008); }
.ava-card.r-legendary { filter: drop-shadow(0 0 12px #FFD23F88); }
.ava-card.r-epic { filter: drop-shadow(0 0 10px #B26BFF88); }
.lk-id { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 240px; }
.lk-name { font-family: var(--display); font-size: 34px; margin: 0; letter-spacing: 1px; }
.lk-stats { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--pixel); font-size: 10px; color: var(--soft); }
.lk-stats b { font-size: 18px; margin-right: 4px; }
.lk-titles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lk-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 18px; }
.lk-title b { font-family: var(--pixel); font-size: 11px; color: var(--yel); }
.lk-title.t-clown b { color: var(--red); }
.lk-sec { display: flex; flex-direction: column; gap: 12px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tc-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 10px;
  background: var(--panel); border: 2px solid var(--line); opacity: .55; text-align: center; font-size: 15px; }
.tc-tile.got { opacity: 1; border-color: var(--yel); box-shadow: 0 0 12px #FFD23F44; }
.tc-tile b { font-family: var(--display); font-size: 28px; color: var(--yel); }
.tc-ic { font-size: 26px; }
.tn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.tn { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; }
.tn.won { border-color: var(--yel); }
.tn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.tn-date { font-family: var(--pixel); font-size: 10px; color: var(--soft); }
.tn-score { font-family: var(--display); font-size: 26px; line-height: 1; color: var(--yel); }
.tn-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border: 2px solid; border-radius: 999px; font-family: var(--pixel); font-size: 8px; line-height: 1.5; }
.tchip > span { font-size: 15px; line-height: 1; }
.tchip small { font-family: var(--body); font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tchip.t { border-color: var(--yel); color: var(--yel); background: rgba(255, 210, 63, .08); }
.tchip.a { border-color: var(--blu); color: #8DB8FF; background: rgba(61, 139, 255, .08); }
.sw-slot { display: flex; flex-direction: column; gap: 8px; }
.sw-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; border-radius: 10px;
  background: var(--panel); border: 2px solid var(--line); color: var(--text); text-align: center; font: inherit; }
button.sw { cursor: pointer; }
.sw.got { border-color: var(--rc); }
.sw.locked { opacity: .45; }
.sw.locked .ava { filter: saturate(.55) brightness(.7); }
.sw.on { background: var(--panel2); box-shadow: 0 0 0 2px var(--rc), 0 0 14px var(--rc); }
.sw-name { font-family: var(--pixel); font-size: 9px; line-height: 1.4; }
.sw-r { font-family: var(--pixel); font-size: 8px; }
.sw-how { font-size: 14px; line-height: 1.2; }
.sw-on { position: absolute; top: 6px; right: 6px; font-family: var(--pixel); font-size: 7px; background: var(--yel); color: var(--bg); padding: 3px 4px; border-radius: 3px; }
@media (max-width: 700px) { .lk-hero { padding: 16px; justify-content: center; }  .sw-row { grid-template-columns: repeat(2, 1fr); } }
.lk-id .linkish { align-self: flex-start; }

/* ---------- Pixel avatars + editor (Nov 29) ---------- */
.pava { image-rendering: pixelated; image-rendering: crisp-edges; display: block; flex: none; border-radius: 6px; }
.ava-card { margin: 0; width: var(--cw); padding: 10px; border-radius: 12px; border: 3px solid #000; background: linear-gradient(160deg, #3A3A5A, #20203A);
  display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.ava-card.r-rare { background: linear-gradient(160deg, #2E5BD9, #16205A); }
.ava-card.r-epic { background: linear-gradient(160deg, #8A3FE0, #2A1050); }
.ava-card.r-legendary { background: linear-gradient(160deg, #FFD23F, #B8860B 60%, #6A4A08); }
.ava-card.r-epic::after, .ava-card.r-legendary::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, #ffffff55 45%, transparent 60%); background-size: 250% 100%; animation: ac-foil 3.2s linear infinite; }
@keyframes ac-foil { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .ava-card::after { animation: none !important; } }
.ac-art .pava { border-radius: 8px; border: 2px solid #000; }
.ava-card figcaption { display: flex; flex-direction: column; align-items: center; gap: 3px; background: #0B0B12; border: 2px solid #000; border-radius: 6px; padding: 6px 4px; }
.ava-card figcaption b { font-family: var(--display); font-size: 15px; letter-spacing: 1px; color: #fff; }
.ava-card figcaption span { font-family: var(--pixel); font-size: 8px; color: var(--soft); letter-spacing: 1px; }
.sw .pava { margin: 0 auto; }
.ae { display: flex; flex-direction: column; gap: 12px; }
.ae-grid { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.ae-left { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; }
.ae-big { line-height: 0; }
.ae-big .pava { width: 160px; height: 176px; border: 3px solid #000; border-radius: 10px; }
.ae-small { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ae-rk { font-family: var(--pixel); font-size: 10px; color: var(--yel); }
.ae-small b { flex: 1; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-sc { font-family: var(--display); font-size: 18px; }
.ae h4 { font-family: var(--pixel); font-size: 9px; color: var(--soft); margin: 0 0 6px; letter-spacing: 1px; }
.ae-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ae-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ae-chip { font-family: var(--pixel); font-size: 9px; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 2px solid var(--line2); background: var(--panel2);
  color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ae-chip:hover { border-color: var(--soft); }
.ae-chip.on { border-color: var(--yel); background: #3A3320; color: var(--yel); }
.ae-chip.locked { opacity: .75; border-style: dashed; }
.ae-aura .ae-chip { border-color: var(--rc); }
.ae-aura .ae-chip.on { box-shadow: 0 0 0 2px var(--yel); }
.ae-new { font-style: normal; font-size: 7px; background: var(--red); color: #fff; border-radius: 4px; padding: 2px 4px; }
.ae-sw { width: 34px; height: 34px; border-radius: 8px; border: 3px solid var(--line2); background: var(--sw); cursor: pointer; padding: 0; }
.ae-sw.on { border-color: var(--yel); box-shadow: 0 0 0 2px #000 inset; }
.ae-no { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--pixel); font-size: 9px; color: var(--soft); }
.ae-no input { width: 70px; min-height: 36px; font-size: 18px; text-align: center; background: var(--bg); color: var(--text); border: 2px solid var(--line2); border-radius: 8px; }
.ae-lock { margin: 0; color: var(--yel); font-size: 16px; line-height: 1.25; }
.ae-lock.small { font-size: 15px; color: var(--soft); }
.ae-hint { margin: 6px 0 0; font-size: 15px; }
.ae-actions .btn[aria-disabled="true"] { opacity: .55; }
@media (max-width: 700px) {
  .ae-grid { grid-template-columns: 1fr; gap: 14px; }
  /* the preview, the board-size check and SAVE stay pinned at the top while the parts scroll under them */
  .ae-left { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center;
    border-bottom: 2px solid var(--line); }
  .ae-big { grid-row: span 3; }
  .ae-big .pava { width: 80px; height: 88px; border-width: 2px; }
  .ae-left > small, .ae-left .ae-lock.small { display: none; }
  .ae-lock { font-size: 14px; }
  .ae-small { padding: 4px 8px; }
  .ae-actions { margin: 0; gap: 8px; }
  .ae-actions .btn { min-height: 40px; padding: 0 14px; }
  .ae-chip { font-size: 8px; min-height: 40px; }
  .ae-sw { width: 40px; height: 40px; }
}
