

/* --- SETUP TAB & HERO --- */
/* MLS: the hero sits outside the tabs (above the setup checklist), so hide it whenever the
   Dashboard (#setupTab) isn't the active tab. */
.container:not(:has(> #setupTab.active)) > .mls-hero {
    display: none;
}

/* --- GUIDE BANNER --- */
.guide-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-wrap: pretty;
}

/* --- LAYOUT PRIMITIVES --- */
/* The collapsible "upload one file per position" panel -- identical markup duplicated for
   ROS and Weekly rankings uploads. */
.multi-upload-panel {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

/* The row of position checkboxes inside a .multi-upload-panel -- also duplicated for ROS
   and Weekly. */
.pos-checkbox-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.pos-checkbox-label { display: flex; align-items: center; gap: var(--space-1); font-size: 0.85rem; cursor: pointer; }

/* The <fieldset> that groups a .pos-checkbox-row with its "Check the positions..." prompt, so
   screen readers announce the prompt with each checkbox. Browser default fieldset border,
   padding and margin are stripped so it looks the same as the old plain wrapper; min-width: 0
   stops the fieldset from refusing to shrink on narrow phones (a browser quirk). */
.pos-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pos-fieldset-legend { display: block; padding: 0; font-size: 0.85rem; font-weight: 600; color: var(--text-main); }

/* --- BADGES & POSITIONAL STYLING --- */
/* Once kickoff has passed (see getKickoffBadgeHTML in js/mls/lineup/gameInfo.js), the badge swaps from the clock
   time to "Started" -- a deeper, more solid blue so it visually reads as "locked in" rather
   than "upcoming", pairing with the auto-lock indicator icon used on that same row. */
.kickoff-started { background: rgba(59, 130, 246, 0.28); color: #bfdbfe; border-color: #3b82f6; }

/* Lineup tab's "next lock" countdown (top of the card) -- reuses the same blue used for
   kickoff-badge/kickoff-started above, since this is the same "kickoff time" information,
   just summarized across the whole lineup instead of shown per-player. Deliberately not
   red/amber: this is routine status, not a warning, so it shouldn't compete visually with
   the "Action Required: Differs from Sleeper lineup" banner it can appear right above. */
.lineup-lock-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}
.lineup-lock-countdown-time {
    color: #bfdbfe;
    font-weight: 700;
}

/* What this lineup needs from you (improvements S11, round 4; js/mls/lineup/gameInfo.js, getLineupNeedsHTML): one
   box above the lineup in place of the red injured-starter warning, the purple IR-slot line and the amber "differs
   from Sleeper" line. Neutral, like the Dashboard's box; each item takes its color (.mls-needs-item below). */
.lineup-needs-box { border-radius: 8px; background: var(--surface-inset); padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; font-size: 0.85rem; }
.lineup-needs-title { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; font-weight: 600; color: var(--text-main); cursor: pointer; }
.lineup-needs-title > span { flex: 1; min-width: 0; }
/* Its chevron turns with the shared .chevron rule (css/base.css, CHEVRONS; improvements F11). */
.lineup-needs-title > .mls-change-chevron { flex-shrink: 0; color: var(--text-muted); }
.lineup-needs-title > svg { flex-shrink: 0; color: var(--text-muted); }
.lineup-needs-box.has-problems .lineup-needs-title > svg { color: #f59e0b; }
.lineup-needs-list { list-style: none; margin: 0.35rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.lineup-needs-item { line-height: 1.45; color: var(--text-muted); }
.lineup-needs-btn { margin-left: 0.35rem; font-size: 0.75rem; padding: 2px 10px; }
.lineup-needs-box .lineup-needs-sleeper { margin-top: 0.4rem; }
.lineup-needs-box .lineup-needs-title + .lineup-needs-sleeper { margin-top: 0.4rem; }
.lineup-needs-sleeper-text { margin: 0.4rem 0 0; color: var(--text-muted); line-height: 1.45; }
.lineup-needs-note { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--text-muted); }
/* Early-game swaps (improvements S50, round 4): a fold of the box, or under its title when they're all it has. Got it
   sits after the note, on its line. */
.lineup-needs-early-body { margin-top: 0.15rem; }
.early-swap-list { margin: 0.25rem 0; padding-left: 1.1rem; }
.early-swap-note { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.early-swap-note .lineup-needs-btn { margin-left: 0; }

.sim-lookup-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-4);
}
.sim-lookup-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.sim-lookup-range {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}
.sim-lookup-injury-flag {
    font-size: 0.8rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: var(--space-2);
}
.sim-lookup-injury-flag.is-excluded {
    color: #fca5a5;
}

/* Collapsible variant of .lineup-lock-countdown above, used when several starters share the
   exact same earliest kickoff moment (see getNextLockCountdownHTML) -- same pill look, just
   stacked (header row + expandable name list) instead of a single line. Collapsed by default
   so a big Sunday-1pm-style slate with many simultaneous locks doesn't turn this into a wall
   of names; tapping it reveals exactly who, without having to scroll into the lineup below. */
.lineup-lock-countdown-collapsible {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}
.lock-countdown-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    width: 100%; /* <button> since Chunk 3; buttons don't stretch like the old <div> did */
}
.lock-countdown-header .chevron {
    flex-shrink: 0;
}
.lineup-lock-countdown-collapsible:not(.expanded) .lock-countdown-detail {
    display: none;
}
.lock-countdown-detail {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(96, 165, 250, 0.25);
    font-weight: 500;
    color: #bfdbfe;
}
.status-good { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-warn { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.status-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.status-pending { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

/* --- MLS LINEUP & ROSTER TAB SPECIFIC STYLES --- */

/* Shared classes consolidated from repeated inline styles across the old lineup/mls.js's several
   player-row renderers (Roster, Scout table, Lineup). Prefixed mls- deliberately: these rules sat in
   styles.css, shared with My Draft Strategist, until refactor 4A, and an earlier un-prefixed shared class (.btn-sm) caused a real collision
   between the two apps -- see the .mds-btn-sm note further down for the full story. */
.mls-tooltip-center { display: flex; justify-content: center; width: 100%; }
.mls-dotted-underline { border-bottom: 1px dotted currentColor; cursor: pointer; }
.mls-error-text { color: var(--error-text); }
.mls-meta-row { font-size: 0.8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; }
.mls-text-right { text-align: right; }
.mls-player-row-info { display: flex; align-items: center; gap: 0.6rem; overflow: hidden; }
.mls-player-row-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

/* MLS player headshots (Roster list + Lineup starters/bench) -- see playerHeadshotHTML in
   js/mls/lineup/headshots.js. The circle always renders at a fixed size with the player's initials inside;
   the Sleeper photo sits on top and removes itself if it fails to load, so rows keep one
   shape and the name column starts at the same x whether or not a photo exists. The photo
   paints the circle's background (improvements F3), so the initials never show through its
   transparent parts or while it loads; they show only once a failed photo has removed itself. */
.mls-headshot {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}
.mls-headshot-initials {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    line-height: 1;
}
.mls-headshot-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--card-bg);
}
.mls-headshot-def .mls-headshot-initials { font-size: 0.56rem; }
body.mls-hide-headshots .mls-headshot { display: none; }
@media (max-width: 480px) {
    .mls-headshot { width: 28px; height: 28px; }
    .mls-headshot-initials { font-size: 0.56rem; }
    .mls-headshot-def .mls-headshot-initials { font-size: 0.5rem; }
}
.mls-player-row-meta { margin-top: 3px; display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
/* Sits between the name and the team/rank meta row -- holds status badges (injury, bye, early,
   kickoff, Sleeper-mismatch) on their own line so a heavily-flagged player doesn't crowd the
   name line or force ugly mid-word wraps on mobile. */
.mls-player-badges-row { margin-top: 3px; display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
/* Roster tab: injury / rookie / bye badges on the player's name line instead of a row of their
   own, so every roster card stays two lines. inline-flex + nowrap keeps the group together:
   on a long name at phone width the whole group drops to the next line rather than splitting.
   The badges' own margin-left is zeroed here since the gap already spaces them. The space from
   the name is a real space character in the markup, not a margin: a wrapped line drops its
   leading space, so a wrapped group lines up flush under the name instead of indented. */
.mls-name-badges { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.15rem; white-space: nowrap; vertical-align: middle; position: relative; top: -1px; }
/* One size for every badge in the group: .badge-rookie/.bye-badge carry a 1px border and
   .inj-badge doesn't, so side by side they sat at different heights and a rookie card came out
   2px taller than an injured one. Same padding + a border on all (transparent on injury). */
.mls-name-badges .badge { margin-left: 0; padding: 1px 4px; font-size: 0.65rem; line-height: 1.3; border-style: solid; border-width: 1px; }
.mls-name-badges .inj-badge { border-color: transparent; }
/* "Drop 1" to "Drop 3" (improvements S54): your most droppable players. Outlined in amber, the same "worth a look"
   family as the FAAB bid, so it doesn't read as an injury (red) or a roster status (violet). A button: tap for why. */
.mls-drop-badge { background: rgba(251, 191, 36, 0.12); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.7); padding: 1px 4px; font-size: 0.65rem; margin-left: 4px; }
button.mls-drop-badge { font-family: inherit; line-height: inherit; cursor: pointer; }
/* Its sheet: the reasons, the top five drops with scores, and who isn't suggested. */
.mls-drop-lead { margin: 0 0 0.35rem; }
.mls-drop-facts { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.85em; }
.mls-drop-find { width: 100%; margin: 0 0 1.25rem; }
.mls-drop-heading { margin: 0 0 0.5rem; font-size: 0.95rem; }
.mls-drop-list { margin: 0 0 0.75rem; padding-left: 1.4rem; display: grid; gap: 0.5rem; }
.mls-drop-list li.is-current strong { color: #fbbf24; }
.mls-drop-why, .mls-scan-benchmark-why { color: var(--text-muted); font-size: 0.85em; }
.mls-drop-note { color: var(--text-muted); font-size: 0.85em; margin: 0 0 0.5rem; }
.mls-rank-badge { background: #1c2541; border: 1px solid var(--border); }
/* Lineup tab: a two-number rank badge ("Pos: #5 (T3) | Flex: #13 (T3)", rankBadgeParts in js/mls/render/lineup.js)
   splits onto two lines at the bar when the row is too narrow, instead of being cut off (improvements F6, owner's
   choice). Each part keeps a gap on its left with the bar centred in it (0.908em, the width the old " | " text had,
   so a badge that fits looks as before); the wrapper starts one gap to the left and
   clips that strip, so a part that wraps to the start of a line loses its bar while one beside another keeps it.
   Where it fits (desktop), it looks as before. */
.mls-rank-parts { display: inline-flex; flex-wrap: wrap; margin-left: -0.908em; clip-path: inset(0 0 0 0.908em); }
.mls-rank-part { position: relative; margin-left: 0.908em; white-space: nowrap; }
.mls-rank-bar { position: absolute; right: 100%; width: 0.908em; text-align: center; white-space: normal; }
.mls-rank-badge:has(.mls-rank-parts) { white-space: normal; }
/* Split onto two lines: one column, so the box fits its text instead of the row's width (fitRankBadges). */
.mls-rank-parts.is-stacked { flex-direction: column; }
/* Optional tier shown beside a rank on player cards ("#12 (T3)") -- see tierTag in js/mls/constants.js. */
.mls-tier { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.mls-rank-sep { opacity: 0.5; }
/* Opponent ("@ PHI" / "vs KC") shown right after the kickoff badge on the Lineup row's badge line
   (see getGameInfoHTML in js/mls/lineup/gameInfo.js) -- plain text rather than another badge. The wrapper keeps the
   two together if the line wraps. */
.mls-game-info { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.mls-opp { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
/* Projected (or, once the game is final, actual) points at the right edge of a Lineup row: the
   number on top, a small caption under it saying which it is. Lives inside .mls-row-actions
   rather than as its own flex child of .lineup-slot, since that layout stretches any middle child. */
.mls-pts { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; min-width: 2.2rem; margin-right: 0.15rem; }
.mls-pts-main { font-weight: 700; font-size: 0.95rem; color: var(--text-main); font-variant-numeric: tabular-nums; }
.mls-pts-sub { font-size: 0.6rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mls-pts-none .mls-pts-main { color: var(--text-muted); font-weight: 400; }
.mls-row-actions { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.mls-stat-blue { color: #93c5fd; }
.mls-stat-green { color: #86efac; }
.mls-stat-red { color: #fca5a5; }
.mls-item-name { font-weight: bold; font-size: 0.95rem; margin-bottom: 4px; }
.mls-item-subtext { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.lineup-action-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.btn-flex-2 { flex: 2; margin-top: 0 !important; }
.btn-flex-1 { flex: 1; margin-top: 0 !important; }
/* Phones: the three buttons kept 1.5rem of padding each side and wouldn't shrink, so the row needed about 400px and
   made the Lineup tab 8px wider than a 390px screen. A mobile browser then widened the page while the tab showed, which
   also aborted every view transition into it (improvements S16, found with the owner's data). Less padding, and allowed
   to shrink. */
@media (max-width: 480px) {
    .lineup-action-row { gap: 0.5rem; }
    .lineup-action-row > .btn { min-width: 0; padding-left: 0.75rem; padding-right: 0.75rem; }
}

.lineup-container-wrapper {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.lineup-empty-state,
.bench-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

/* Early Games Control Group */
.early-games-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.team-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
/* Early Games' chips, one row per day (improvements S50, round 2): the day the schedule's teams play in your time,
   "Schedule" before this visit's kickoffs load, then "Added" for the teams you picked. The chips are compact: the ✕
   keeps its 44px tap area by reaching past the chip's edges (negative margins), and the rows are 44px apart, so
   neighbouring tap areas don't overlap. Teams you took off the schedule's list sit under them with Put back. */
.early-days {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1rem;
}
/* The empty line ("No teams selected.") spans the grid, so it wraps instead of widening the label column. */
.early-days > .early-empty { grid-column: 1 / -1; }
/* Each row's label and chips sit in the card's one grid, so the labels ("Thu 5:15 PM") share a column. */
.early-day { display: contents; }
.early-day-label,
.early-day-teams { min-height: 44px; display: flex; align-items: center; }
.early-day-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.early-day-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 1.25rem;
}
.early-day .team-chip {
    gap: 0.25rem;
    padding: 0.2rem 0.25rem 0.2rem 0.65rem;
}
.early-day .team-chip .close-chip {
    margin: -14px -10px -14px -8px;
}
.early-removed {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.early-removed-team { white-space: nowrap; }

/* Weekly Rankings Feedback */
.weekly-meta-display {
    font-size: 0.75rem;
    color: #60a5fa;
    font-weight: 700;
    display: none;
    margin-bottom: 0.5rem;
}

/* --- Lineup Slots & Roster Rows --- */
/* Rows are flat list rows (improvements M17): a state that carries meaning keeps a 3px coloured edge, with room for it. */
.lineup-slot.locked { 
    box-shadow: inset 3px 0 0 var(--primary-green); 
}

.lineup-slot.swapping, .roster-item.swapping { 
    box-shadow: inset 3px 0 0 #f59e0b; 
    background: rgba(245, 158, 11, 0.06); 
}

.lineup-slot.empty {
    color: var(--text-muted);
}

/* Taxi-squad rows at the foot of the bench. Recedes via a flatter background and a dashed
   border -- the same "not in play" language .lineup-slot.empty already uses -- rather than
   via opacity, which would also wash out the TAXI and injury badges these rows exist to
   show. Everything on the row stays at full contrast; only its container steps back. */
/* (A dashed divider between taxi rows: at the end of this file, with the other list-row dividers.) */

/* Separates real bench depth from the taxi squad below it. A rule with an inset label rather
   than a full section header: the taxi group belongs to the bench list visually (same rows,
   same card) and a second heading here would imply a second card's worth of importance. */
.bench-taxi-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0 0.6rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.bench-taxi-divider::before,
.bench-taxi-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.lineup-slot .slot-badge { 
    width: 46px;
    min-width: 46px;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.68rem; /* small enough that "SFLEX" still fits at this fixed width */
}

/* Consolidated slot indicator for the Lineup tab (starters + bench): replaces the old
   plain-text slot-label ("RB1") + separate colored pos-badge pair with a single badge, styled
   like pos-badge, showing just the slot TYPE with no player-count suffix (slotType in js/mls/render/lineup.js is
   already digit-stripped before this renders, so "RB1"/"RB2" both just show "RB"). Fixed width
   above keeps every row's name column starting at the same x position regardless of whether the
   slot text is "RB" or "SFLEX".
   The player's actual position is only shown separately (see .mls-plain-pos) when the slot type
   itself doesn't already reveal it -- FLEX, SFLEX, and bench -- so this never duplicates info a
   strict RB/WR/TE/QB/K/DEF slot already conveys. */
.slot-badge {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    box-sizing: border-box;
}
.slot-badge.slot-QB  { background-color: var(--pos-qb);  color: #fca5a5; border: 1px solid var(--pos-qb-border); }
.slot-badge.slot-RB  { background-color: var(--pos-rb);  color: #86efac; border: 1px solid var(--pos-rb-border); }
.slot-badge.slot-WR  { background-color: var(--pos-wr);  color: #93c5fd; border: 1px solid var(--pos-wr-border); }
.slot-badge.slot-TE  { background-color: var(--pos-te);  color: #fde047; border: 1px solid var(--pos-te-border); }
.slot-badge.slot-K   { background-color: var(--pos-k);   color: #e2e8f0; border: 1px solid var(--pos-k-border); }
.slot-badge.slot-DEF { background-color: var(--pos-def); color: #e9d8fd; border: 1px solid var(--pos-def-border); }
/* FLEX and SFLEX: a border blended from the positions each takes (--flex-blend, --sflex-blend in css/base.css). */
.slot-badge.slot-FLEX { color: #e2e8f0; border: 1px solid transparent; background: var(--blend-fill) padding-box, var(--flex-blend) border-box; }
.slot-badge.slot-SFLEX { color: #e2e8f0; border: 1px solid transparent; background: var(--blend-fill) padding-box, var(--sflex-blend) border-box; }
/* Sleeper's restricted flex slots (improvements S1): W/T (WR/TE) and W/R (RB/WR). */
.slot-badge.slot-WRTE { color: #e2e8f0; border: 1px solid transparent; background: var(--blend-fill) padding-box, var(--wt-blend) border-box; }
.slot-badge.slot-WRRB { color: #e2e8f0; border: 1px solid transparent; background: var(--blend-fill) padding-box, var(--wr-blend) border-box; }
.slot-badge.slot-BN,
.slot-badge.slot-ROS { background-color: rgba(148, 163, 184, 0.12); color: var(--text-muted); border: 1px solid var(--border); }
/* Taxi squad, at the foot of the bench list. Same muted greys as .slot-BN rather than a new
   hue, because a taxi player is a quieter version of a bench player, not a different kind of
   alert -- the dashed border carries the whole distinction, reading as "parked, not in play"
   against every other slot badge's solid one. */
/* IR (a player in your Sleeper IR slot, improvements S9) is parked the same way. */
.slot-badge.slot-TX, .slot-badge.slot-IR { background-color: rgba(148, 163, 184, 0.06); color: var(--text-muted); border: 1px dashed var(--border); }

/* Plain, unstyled position text -- deliberately NOT a badge, since a second colored pill here
   is exactly the duplication the slot-badge consolidation above was meant to remove. Shown on
   every row (see js/mls/render/) so every row's meta line has the same leading element -- color comes
   from the existing .pos-text-* utility (extended below with K/DEF) so it matches the
   corresponding slot-badge/pos-badge color without a second color palette to maintain. Small
   left padding matches the kickoff-badge's own inset, so its text starts at the same x as the
   name and kickoff lines above it rather than being thrown off by the badge's padding. */
.mls-plain-pos { font-size: 0.75rem; font-weight: 600; padding-left: 4px; }

.player-name-wrap { 
    font-weight: 600; 
    color: var(--text-main); 
    line-height: 1.3; 
    font-size: 0.95rem; 
    /* Matches .mls-plain-pos's left padding below, so the name text and the position text on
       the meta line start at the same x -- both are plain text with no badge chrome to offset
       them, but the kickoff badge above still has its own small inset, hence the 4px here. */
    padding-left: 4px;
}

.team-chip { 
    background: var(--target-bg); 
    padding: 0.35rem 0.75rem; 
    border-radius: 999px; 
    font-size: 0.8rem; 
    font-weight: 600; 
    color: var(--primary-green); 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
    border: 1px solid var(--target-border); 
}

.team-chip .close-chip { 
    cursor: pointer; 
    color: #fca5a5; 
    font-size: 1rem; 
    line-height: 1; 
    transition: opacity var(--motion-effects-default-ms) var(--motion-effects-default); 
}

.team-chip .close-chip:hover {
    opacity: 0.7;
}
/* Now a <button> (was a <span>): drop the browser's button chrome so it looks the same. */
button.close-chip {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}
.close-chip:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: -4px;
    border-radius: 4px;
}

/* ▲/▼ on the first/last league. The dimming used to be a second style="" attribute on a button
   that already had one, which browsers ignore, so disabled arrows looked clickable. */
.mls-league-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Action Buttons within slots */
.swap-btn { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
.lock-btn { font-size: 1.1rem; background: transparent; border: none; cursor: pointer; padding: 0 0.25rem; }
/* The override control of an auto-locked starter (blue padlock). Its look was inline until improvements S32 round 2, which
   kept a phone's hide rule from reaching it. */
.lineup-slot .mls-autolock-btn { background: none; border: none; cursor: pointer; padding: 0 4px; display: inline-flex; }

/* Phone sizes for the MLS-only parts of the slot rows (split from the shared block in css/base.css in 4D). */
@media (max-width: 480px) {
    .lineup-slot .slot-badge { 
        width: 42px; 
        min-width: 42px; 
        font-size: 0.62rem; 
    }
    
    .player-name-wrap { 
        font-size: 0.85rem; 
    }
    
    .swap-btn { 
        padding: 0.3rem 0.5rem; 
        font-size: 0.75rem; 
    }
    
    .lock-btn { 
        /* Bumps the SVG size up slightly for better touch targets */
        transform: scale(1.1); 
    }

    /* Points, swap and lock stacked in a narrow column on the right (improvements S24, round 14, owner's idea): side by
       side they took about 100px, which split names like "Rhamondre Stevenson (11)" onto two lines with room to spare.
       Rows with a game-time or status badge keep their height; a bare two-line row grows to the column's height.
       Centred on one line (round 15, owner): right-aligned, the caption, the bordered swap and the borderless lock looked ragged. */
    .lineup-slot .mls-row-actions { flex-direction: column; align-items: center; gap: 0.25rem; }
    .lineup-slot .mls-pts { margin-right: 0; align-items: center; min-width: 0; }
}
/* Scout Tab Specific Styles */
.scout-textarea { 
    width: 100%; 
    min-height: 90px; 
    background: rgba(0, 0, 0, 0.2); 
    color: var(--text-main); 
    border: 1px solid var(--border); 
    border-radius: 6px; 
    padding: 0.8rem; 
    margin-bottom: 0.75rem; 
    font-family: inherit; 
    resize: vertical; 
    transition: border-color var(--motion-effects-fast-ms) var(--motion-effects-fast), box-shadow var(--motion-effects-fast-ms) var(--motion-effects-fast);
}

.scout-textarea:focus { border-color: var(--primary-green); }

/* Result rows inside their card (improvements M17): list rows with a divider, no box. */
.scout-result-card { 
    padding: 1rem 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: background-color var(--motion-effects-fast-ms) var(--motion-effects-fast);
}
.scout-result-card + .scout-result-card { border-top: 1px solid var(--divider); }

/* Hover: Material 3's 8% state layer, with the other list rows at the end of this file. */

.scout-status { 
    font-size: 0.75rem; 
    font-weight: 700; 
    padding: 0.35rem 0.6rem; 
    border-radius: 999px; 
    display: inline-block; 
    text-align: center; 
    letter-spacing: 0.5px;
}

.status-avail { background: var(--target-bg); color: var(--primary-green); border: 1px solid var(--target-border); }
.status-owned { background: var(--avoid-bg); color: #fca5a5; border: 1px solid var(--avoid-border); }
.status-mine { background: var(--dart-bg); color: #93c5fd; border: 1px solid var(--dart-border); }
/* --- MLS SCOUT TAB SPECIFIC STYLES --- */

/* Info Banner Component */
/* --- MATCHUP SIMULATOR (MONTE CARLO) RESULTS --- */
/* Markup for this comes from js/mls/sim/ui.js's worker.onmessage handler. */
.simulation-card {
    background: var(--surface-inset); /* inside the Simulator's card: one shade lighter, no border (improvements M17) */
    border-radius: 8px;
    padding: 1.25rem;
}

.simulation-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.probability-bar-legend {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.legend-you { color: var(--primary-green, #10b981); }
.legend-opp { color: var(--btn-blue-bg, #3b82f6); }

.probability-bar {
    display: flex;
    width: 100%;
    height: 0.6rem;
    border-radius: 6px;
    overflow: hidden;
}

.bar-you { background: var(--primary-green, #10b981); }
.bar-opp { background: var(--btn-blue-bg, #3b82f6); }

.simulation-card small {
    display: block;
    margin-top: 0.6rem;
    color: var(--text-muted);
}

/* Standalone message shown in the results container in place of a result card -- "not enough
   roster data", a bye week, or a worker that failed to load. */
.sim-message {
    margin: 0;
    color: var(--text-muted);
}

.sim-message-error {
    color: #fca5a5;
}

.sim-fallback-note {
    color: #fbbf24 !important;
}

.sim-lineup-note {
    color: #93c5fd !important;
}

.sim-projection-note {
    color: #86efac !important;
}

.sim-actual-note {
    color: #93c5fd !important;
}

.sim-final-tag {
    color: #93c5fd;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

.sim-team-columns {
    display: flex;
    gap: 1.25rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.sim-team-column {
    flex: 1 1 240px;
    min-width: 0;
}

.sim-team-column h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sim-player-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sim-player-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.sim-player-row:last-child { border-bottom: none; }

.sim-player-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sim-player-name { font-weight: 500; }

.sim-player-boombust {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sim-player-info .pos-badge,
.sim-bench-row .pos-badge,
.sim-waiver-empty .pos-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
}

.sim-bust { color: #f87171; }
.sim-boom { color: #4ade80; }

.sim-player-range {
    white-space: nowrap;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sim-player-mean {
    font-size: 0.75rem;
}

.sim-bench-insights {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.sim-bench-insights h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sim-bench-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sim-bench-row {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.sim-bench-row strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Waiver Insights when the check ran but produced no rows (see renderWaiverInsights in
   js/mls/sim/ui.js): a green confirmation when nothing beat your starters, amber when the check
   couldn't run, so an empty section never reads as "did this even do anything?". */
.sim-waiver-empty {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
}
.sim-waiver-empty-ok {
    color: var(--text-main);
    background: var(--target-bg);
    border: 1px solid var(--target-border);
}
.sim-waiver-empty-warn {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.sim-waiver-check {
    color: var(--primary-green);
    font-weight: 700;
    margin-right: 4px;
}

/* Card Header Inline Actions */
.header-actions-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Trade Analyzer Section Headers */
.trade-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.text-target-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4ade80;
    display: flex;
    align-items: center;
}

.text-avoid-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fca5a5;
    display: flex;
    align-items: center;
}

.scout-output-container {
    margin-top: 1.25rem;
}

/* --- COLLAPSIBLE WAIVER UPGRADE SECTIONS (Scout tab, Auto-Find Upgrades) ---
   Reuses .rankings-card/.rankings-card-header/.rankings-card-body (see the Roster/Lineup
   tabs' upload cards) purely for the expand/collapse mechanics -- those classes don't require
   .settings-card, so they work fine nested inside the Waiver Wire Assistant card without
   double-applying its box styling. .mls-waiver-section supplies its own lighter box instead. */
.mls-waiver-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.mls-waiver-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
}

/* Waiver section toggle: <h4><button> filling the header, title left and chevron right
   (same layout the old role="button" header div had). */
.mls-waiver-section-heading {
    margin: 0;
    font-size: inherit;
    flex: 1;
    min-width: 0;
}
.rankings-card-toggle.mls-waiver-section-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.mls-waiver-section-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mls-waiver-section-body {
    padding: 0.9rem;
}

/* Trade Analyzer -- Fairness Verdict Banner */
.trade-verdict-banner {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--surface-inset);
}
/* The verdict is a tint, not a frame (improvements M17, owner's choice): .verdict-* below give the colour, as a background
   only. The same for the side-by-side tiles (.mls-trade-tile). */
.trade-verdict-banner, .mls-trade-tile { border: 0; }

/* Your Rankings and Market Consensus side by side from tablet width up (improvements S19, round 9). */
.trade-verdict-pair { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 0.75rem; }
@media (min-width: 840px) {
    .trade-verdict-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.trade-verdict-source-label {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.trade-verdict-source-label .tooltip-icon {
    width: 14px;
    height: 14px;
    font-size: 9px;}

.trade-verdict-source-label .tooltip-text {
    text-transform: none;
    letter-spacing: normal;
}

.trade-verdict-subnote {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.trade-verdict-totals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.trade-verdict-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trade-verdict-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.trade-verdict-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

/* These totals are summed from whichever rankings or values the verdict is using, so they're
   estimates -- but at 1.4rem/800 they read like settled, official numbers. "est." sits inside
   the amount so it qualifies the figure rather than the "You Receive" label above it, and is
   small and muted so it doesn't compete with the number it's marking. */
.trade-verdict-est {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 3px;
}

.trade-verdict-vs {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.trade-verdict-result {
    text-align: center;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.trade-verdict-diff {
    font-weight: 600;
    font-size: 0.85rem;
    opacity: 0.85;
    margin-left: 4px;
}

.trade-verdict-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Trade Analyzer -- how your team changes, under the verdict (improvements S14, js/mls/trade/lineupSection.js).
   Sleeper leagues reuse the Power Rankings table and its tooltips (.mls-power-table); manual leagues list the
   starters who change, slot, name and rank on one line, names kept whole. */
.mls-trade-impact { border-radius: 8px; background: var(--surface-inset); padding: 0.85rem 1rem; margin-bottom: 1rem; } /* lighter, no border (M17) */
.mls-trade-impact-head { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.mls-trade-impact-via { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.mls-trade-impact-summary { font-size: 0.85rem; color: var(--text-main); margin: 0.45rem 0 0.5rem; line-height: 1.45; }
.mls-trade-impact-empty { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.mls-trade-impact-notes { margin: 0.55rem 0 0; padding-left: 1.1rem; font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }
.mls-trade-impact-about { display: flex; align-items: center; gap: 6px; margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }
.mls-trade-impact-about-line { display: block; }
.mls-trade-impact-about-line + .mls-trade-impact-about-line { margin-top: 0.5em; }
.mls-trade-impact-table td { white-space: nowrap; }
.mls-trade-rank-up { color: #4ade80; }
.mls-trade-rank-down { color: #fca5a5; }
.mls-trade-impact-partner { margin-top: 0.6rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.mls-trade-impact-partner > summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--text-main); }
/* The same title in Export Trade's image, where the <summary> is swapped for a plain div (trade/export.js). */
.mls-trade-impact-partner-title { font-size: 0.82rem; font-weight: 600; color: var(--text-main); }
.mls-power-tooltip-row.mls-trade-in .mls-power-tooltip-name { color: #4ade80; }
.mls-trade-lineup-row { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.35rem 0; border-top: 1px solid var(--border); }
.mls-trade-lineup-slot { flex: 0 0 2.6em; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); padding-top: 2px; }
.mls-trade-lineup-change { flex: 1 1 auto; min-width: 0; }
.mls-trade-lineup-line { display: flex; gap: 0.4rem; align-items: baseline; font-size: 0.85rem; }
.mls-trade-lineup-sign { flex: 0 0 0.8em; font-weight: 700; }
.mls-trade-lineup-name { flex: 1 1 auto; white-space: nowrap; }
.mls-trade-lineup-rank { flex: 0 0 auto; color: var(--text-muted); font-weight: 600; font-size: 0.78rem; }
.mls-trade-lineup-line.mls-trade-out { color: #fca5a5; }
.mls-trade-lineup-line.mls-trade-in { color: #4ade80; }
.mls-trade-lineup-line em { color: var(--text-muted); }

/* Trade Analyzer -- "To make it fair" under a lopsided verdict (improvements S19, js/mls/trade/fairSection.js): the gap
   and up to three suggestions, one per line on phones with names kept whole and Add at the right edge; two columns from
   tablet width up, like the trade's two sides. */
.mls-trade-fair { border-radius: 8px; background: var(--surface-inset); padding: 0.85rem 1rem; margin-bottom: 1rem; } /* lighter, no border (M17) */
.mls-trade-fair-head { font-size: 0.92rem; font-weight: 600; color: var(--text-main); }
.mls-trade-fair-via, .mls-trade-fair-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.45; }
.mls-trade-fair-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; }
/* A row wraps only when it must (round 14: a long single name, "Amon-Ra St. Brown" beside a Remove button, ran over its
   value at 375px): the names never shrink below their own width (min-content; each player is nowrap), so when they
   don't fit beside the value and button, those two move to a second line, on the right. */
.mls-trade-fair-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--border); }
.mls-trade-fair-badges { flex: 0 0 auto; display: inline-flex; gap: 4px; }
.mls-trade-fair-badges .badge { min-width: 3.3em; justify-content: center; text-align: center; }
.mls-trade-fair-names { flex: 1 1 0; min-width: min-content; font-weight: 700; font-size: 0.88rem; color: var(--text-main); display: flex; flex-wrap: wrap; column-gap: 0.35rem; }
.mls-trade-fair-player { white-space: nowrap; }
.mls-trade-fair-plus { color: var(--text-muted); font-weight: 600; }
.mls-trade-fair-from { color: var(--text-muted); font-weight: 600; font-size: 0.75rem; }
/* Round 5: where a suggestion lands the trade, under its name; "Or take off your side"; the Undo line. */
.mls-trade-fair-lands { flex-basis: 100%; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.mls-trade-fair-or { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.6rem; }
/* Round 9: how Market Consensus sees it, when it disagrees with Your Rankings (amber, like other "check this" notes);
   on its own under a verdict that's fair by your rankings. */
.mls-trade-fair-market { font-size: 0.8rem; color: #fbbf24; margin-top: 0.3rem; line-height: 1.45; }
.mls-trade-fair-market.is-alone { margin: -0.25rem 0 0.9rem; }
/* Round 10: on phones a pair's two names ran over its value (found in my review as a user). There a pair takes two
   lines: badges stacked and the names across, then the value and Add both under them on the right. */
@media (max-width: 839.98px) {
    .mls-trade-fair-item.is-pair .mls-trade-fair-badges { flex-direction: column; }
    .mls-trade-fair-item.is-pair .mls-trade-fair-names { flex: 1 1 calc(100% - 4.5rem); }
}
.mls-trade-fair-undo { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); margin: -0.35rem 0 0.75rem; }
.mls-trade-fair-undo-btn { color: var(--primary-green); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; padding: 0.2rem 0.1rem; }
.mls-trade-fair-val { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-main); font-size: 0.88rem; }
.mls-trade-fair-add { flex: 0 0 auto; }
/* The value and its button move together, to the right of the second line when the row wraps (round 14). */
.mls-trade-fair-act { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 840px) {
    .mls-trade-fair-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Trade Analyzer (improvements S14, round 5): the player picker (js/mls/trade/picker.js) and the compact rows the
   analysis lists each player in (js/mls/scout/engine.js). */
/* Receive and Give side by side from tablet width up, in the form and in the results (round 8); stacked on phones. */
.mls-trade-sides { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; }
.mls-trade-pick-note { margin-top: 0.4rem; font-size: 0.75rem; color: var(--text-muted); }
.mls-trade-side-title { font-weight: 700; margin: 1rem 0 0.5rem; }
.mls-trade-side-get { color: #4ade80; }
.mls-trade-side-give { color: #fca5a5; }
.mls-trade-sides > .mls-trade-side:first-child > .mls-trade-side-title { margin-top: 0; }
@media (min-width: 840px) {
    .mls-trade-sides { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .mls-trade-sides > .mls-trade-side > .trade-group-header.mt-3,
    .mls-trade-sides > .mls-trade-side > .mls-trade-side-title { margin-top: 0; }
}
.mls-trade-picker { display: flex; flex-direction: column; gap: 0.45rem; }
.mls-trade-tokens { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mls-trade-tokens:empty { display: none; }
.mls-trade-token { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 4px 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, 0.04); font-size: 0.85rem; color: var(--text-main); }
.mls-trade-token-name { font-weight: 600; overflow-wrap: anywhere; }
.mls-trade-token-meta { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.mls-trade-token-remove { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: var(--text-muted); font-size: 0.8rem; cursor: pointer; }
.mls-trade-token-remove:hover, .mls-trade-token-remove:focus-visible { color: var(--text-main); background: rgba(255, 255, 255, 0.08); }
.mls-trade-team { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.mls-trade-team select { flex: 1 1 auto; min-width: 0; }
.mls-trade-team[hidden], .mls-trade-pick-row[hidden] { display: none; }
/* Give's From row (improvements F9): your name as plain text, the drop-down's height, one line ending in "…".
   Side by side only: phones stay as they were. */
.mls-trade-team-you { min-width: 0; }
.mls-trade-team-name { flex: 1 1 auto; min-width: 0; width: auto; border-color: transparent; background: transparent; color: var(--text-main); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 839.98px) { .mls-trade-team-you { display: none; } }
/* Side by side, the form's two sides share rows (F9): header | From | players | search | draft picks, each as tall as
   the taller side's, so search lines up with search however many players each side has. The flex column's 0.45rem gap
   becomes margins, so an empty or hidden row takes no space. */
@media (min-width: 840px) {
    @supports (grid-template-rows: subgrid) {
        .mls-trade-form-sides { grid-template-rows: repeat(5, auto); }
        .mls-trade-form-sides > .mls-trade-side { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: 1 / span 5; min-width: 0; }
        .mls-trade-form-sides > .mls-trade-side > .trade-group-header { grid-row: 1; }
        .mls-trade-form-sides .mls-trade-picker { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: 2 / span 4; gap: 0; min-width: 0; }
        .mls-trade-form-sides .mls-trade-team { grid-row: 1; margin-bottom: 0.45rem; }
        .mls-trade-form-sides .mls-trade-tokens { grid-row: 2; align-self: start; margin-bottom: 0.45rem; }
        .mls-trade-form-sides .mls-trade-picker > .autocomplete-wrap { grid-row: 3; }
        .mls-trade-form-sides .mls-trade-pick-row { grid-row: 4; margin-top: 0.45rem; }
    }
}
.mls-trade-pick-row { display: flex; gap: 6px; align-items: center; }
.mls-trade-pick-row select { width: auto; flex: 0 0 auto; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.mls-trade-value-settings { margin-top: 0.75rem; }
.mls-trade-value-settings .settings-subsection { margin: 0; }
/* The second setting (Auto-fetch market values, improvements S38): a gap from the first, no space under its only row. */
.mls-trade-value-settings .settings-subsection + .settings-subsection { margin-top: 0.5rem; }
.mls-trade-value-settings .settings-subsection .toggle-row:last-child { margin-bottom: 0; }
/* A button while market values load (S38): dimmed, with the site's spinner. */
.btn.mls-btn-busy { opacity: 0.7; cursor: progress; }
.mls-trade-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.mls-trade-row .badge { flex: 0 0 auto; min-width: 3.3em; justify-content: center; text-align: center; margin-top: 2px; }
.mls-trade-row-main { flex: 1 1 auto; min-width: 0; }
.mls-trade-row-name { font-weight: 700; font-size: 0.92rem; color: var(--text-main); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mls-trade-row-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
.mls-trade-row-warn { color: #fca5a5; font-weight: 600; }
.mls-trade-row-value { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; }
.mls-trade-row-mkt { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.mls-trade-row-ur { color: var(--text-muted); }

/* Export Trade (improvements S14, js/mls/trade/export.js): the switch and button at the bottom of the Trade Analyzer,
   and the image's own parts (only in html2canvas's clone of #tradeOutput). */
.mls-trade-export-row { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.mls-trade-export-row .btn { width: auto; display: inline-flex; align-items: center; gap: 6px; }
.mls-trade-export-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.mls-trade-export-toggle input { width: 16px; height: 16px; accent-color: var(--primary-green); }
.mls-trade-export-title { font-weight: 800; font-size: 1.05rem; color: var(--text-main); margin-bottom: 0.6rem; }
.mls-trade-export-sidebox { margin-bottom: 0.6rem; }
.mls-trade-export-sidehead { display: flex; gap: 0.5rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 3px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.mls-trade-export-sidehead > span:first-child { flex: 1 1 auto; }
.mls-trade-export-get { color: #4ade80; }
.mls-trade-export-give { color: #fca5a5; }
.mls-trade-export-asset { display: flex; align-items: center; gap: 0.5rem; padding: 3px 0; font-size: 0.9rem; color: var(--text-main); }
.mls-trade-export-asset .badge { min-width: 3.3em; justify-content: center; text-align: center; }
.mls-trade-export-name { flex: 1 1 auto; font-weight: 600; white-space: nowrap; }
.mls-trade-export-val { flex: 0 0 4.2em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mls-trade-export-sidehead .mls-trade-export-val { font-weight: 700; color: var(--text-muted); }
.mls-trade-export-mkt { color: var(--text-muted); }
.mls-trade-export-ur { color: var(--text-muted); font-weight: 600; }
.mls-trade-export-foot { font-size: 0.7rem; color: var(--text-muted); margin: 0.2rem 0 0.8rem; }
.mls-trade-impact-headline { font-size: 0.9rem; font-weight: 700; color: var(--text-main); margin-top: 0.5rem; line-height: 1.4; }
.mls-trade-impact-key { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.35rem; }

/* The market values' age under the verdicts (improvements S14, round 6): amber after a day. */
.mls-trade-market-age { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin: -0.25rem 0 0.75rem; }
.mls-trade-market-age.is-stale { color: #fbbf24; font-weight: 600; }
.mls-trade-market-age a { color: inherit; text-decoration: underline; text-underline-offset: 2px; } /* the FantasyCalc credit (improvements K8) */
/* Market Consensus line: the loaded values were fetched for another format than this league's (S23 follow-up). */
.mls-market-format-warning { color: #fbbf24; font-weight: 600; margin-top: 0.25rem; }

.verdict-fair { border-color: var(--dart-border); background: var(--dart-bg); }
.verdict-fair .trade-verdict-result { color: #93c5fd; }

.verdict-favor-you { border-color: var(--target-border); background: var(--target-bg); }
.verdict-favor-you .trade-verdict-result { color: var(--primary-green); }

.verdict-favor-them { border-color: var(--avoid-border); background: var(--avoid-bg); }
.verdict-favor-them .trade-verdict-result { color: #fca5a5; }

/* No verdict (improvements S19, round 11): a name that matches no player, or a market total missing a piece. */
.verdict-incomplete { border-color: var(--border); background: var(--surface-inset); }
.verdict-incomplete .trade-verdict-result { color: var(--text-muted); }

.mls-stat-value { color: #fde047; }
.mls-stat-market { color: #93c5fd; }

/* MLS-namespaced small button (Setup league manager reorder/remove, Lineup swap/lock controls).
   Renamed from a bare .btn-sm -- that selector was defined twice in this shared stylesheet
   (once here, once in the MDS section above), and because both rules had equal specificity,
   whichever came later in the file silently won on BOTH apps' pages. MLS now uses its own
   namespaced class, matching the .mds-btn-sm pattern, so this sizing can never leak onto MDS's
   buttons (or vice versa) just because someone reorders the file.
   Fully self-contained (not just the padding/font-size/width this used to override) since these
   buttons no longer also match the base .btn-sm rule above -- without border/cursor/etc. repeated
   here, they'd fall back to the browser's default button chrome (visible border, 3D look).
   Do not rename back to .btn-sm. */
.mls-btn-sm {
    padding: 0.25rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--motion-effects-fast-ms) var(--motion-effects-fast), background-color var(--motion-effects-fast-ms) var(--motion-effects-fast), border-color var(--motion-effects-fast-ms) var(--motion-effects-fast), box-shadow var(--motion-effects-fast-ms) var(--motion-effects-fast), opacity var(--motion-effects-default-ms) var(--motion-effects-default), border-radius var(--press-morph);
    letter-spacing: 0.3px;
    width: auto !important;
}
/* Base (desktop) size for the header's prev/next league buttons -- unchanged from what
   used to be inline styles. The @media (max-width: 839.98px) block above bumps this up for
   mobile touch targets. */
.league-nav-btn {
    padding: 0.4rem 0.6rem;
    flex-shrink: 0;
}

.sos-grid { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.85rem; 
    text-align: center; 
}

.sos-grid th { 
    background: rgba(0, 0, 0, 0.3); 
    color: var(--text-muted); 
    padding: 0.6rem 0.4rem; 
    border: 1px solid var(--border); 
    font-weight: 600;
}

.sos-grid td { 
    padding: 0.4rem; 
    border: 1px solid var(--border); 
}

.sos-input { 
    width: 48px; 
    padding: 6px; 
    text-align: center; 
    background: rgba(0, 0, 0, 0.3); 
    color: var(--text-main); 
    border: 1px solid var(--border); 
    border-radius: 4px; 
    font-family: inherit;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    transition: border-color var(--motion-effects-fast-ms) var(--motion-effects-fast), background-color var(--motion-effects-fast-ms) var(--motion-effects-fast), box-shadow var(--motion-effects-fast-ms) var(--motion-effects-fast);
}

.sos-input:focus {
    border-color: var(--primary-green);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* The SoS badge (getSoSBadgeHTML in js/mls/sos.js), the same on the Roster tab and in the Waiver Wire
   Assistant. Its color comes per rank in --sos-color and --sos-bg; this was an inline style until
   improvements S7, and on desktop the Roster tab's badge looks the same as before. Compact: the Waiver
   Wire Assistant's cards, padded like .inj-badge/.bye-badge. */
.badge.sos-badge { background: var(--sos-bg); border: 1px solid var(--sos-color); color: var(--sos-color); font-size: 0.65rem; margin-left: 4px; }
.badge.sos-badge-compact { padding: 1px 4px; }
/* It's a button that explains itself on tap, reset to look like a plain badge. On phones and touch
   screens it shows a calendar icon and the number instead of "SoS: ", which keeps it short without
   reading as another rank; the tap says what it is. */
button.sos-badge { font-family: inherit; font-variant-numeric: inherit; line-height: inherit; text-align: inherit; cursor: pointer; }
.sos-badge-icon { display: none; vertical-align: -1px; margin-right: 2px; }
@media (max-width: 599.98px), (hover: none) and (pointer: coarse) {
    .sos-badge .sos-badge-label { display: none; }
    .sos-badge .sos-badge-icon { display: inline-block; }
}

/* This week's opponent with its matchup rank from your Weekly rankings (rankedOpponentBadgeHTML in js/mls/opponent.js,
   improvements S31): "@ KC 28", in place of the plain .mls-opp text after the kickoff badge. Colored text on the SoS
   scale (--sos-color), not a box, with a faint dotted underline in its own color that says it can be tapped (owner's
   choice, round 3). A button reset to look like the text; padding with a matching negative margin makes it easier to
   hit without moving anything. */
button.opp-rank-badge { background: none; border: 0; font-family: inherit; font-variant-numeric: inherit; line-height: inherit; text-align: inherit; cursor: pointer; padding: 4px 3px; margin: -4px -3px; border-radius: 4px; }
.opp-rank-badge { color: var(--sos-color); text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--sos-color) 55%, transparent); text-underline-offset: 2px; white-space: nowrap; }
/* In the Guide's legend the samples are text with no boxes, so they need more room between them. */
.badge-legend-sample .opp-rank-badge + .opp-rank-badge { margin-left: 0.75rem; }

/* Lineup settings (improvements S31): folded under the Optimize row like the Trade Analyzer's Value settings. The
   rows are the usual toggle rows, the last shown one without its bottom margin. */
.mls-lineup-settings { margin-top: 0.75rem; }
.mls-lineup-settings .accordion-body { padding-top: 0.75rem; }
.mls-lineup-settings .toggle-row:last-child, .mls-lineup-settings .toggle-row:has(+ .toggle-row[hidden]) { margin-bottom: 0; }
#matchupFlipRow[hidden] { display: none; }
/* The SoS card's switch is a toggle row too (improvements S31), inside the status line's grid. */
.sos-status .toggle-row { margin: 0; padding: 0.6rem 0.75rem; }

/* The SoS card's status (renderSoSStatus in js/mls/sos.js): age, scale, the 1 = hardest switch. */
.sos-status { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-muted); display: grid; gap: 0.35rem; }
.sos-status[hidden] { display: none; }
.sos-status-scale { color: var(--text-main); white-space: nowrap; }
.sos-status-muted { color: var(--text-muted); }
.sos-status-warn { font-size: 0.8rem; }
.sos-flip-hint { font-size: 0.78rem; line-height: 1.4; }
.sos-grid-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.5rem 0; }

/* --- MLS SETUP TAB SPECIFIC STYLES --- */
.league-req-subtitle {
    font-size: 0.85rem;
    color: var(--primary-green);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.manual-player-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.5rem;
}

.manual-add-feedback {
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.75rem;
    text-align: center;
}
.manual-add-feedback:empty { display: none; }
.manual-add-feedback.is-error { color: #fb923c; }

/* "Added this session" list under Add Player Manually */
.mls-manual-log:empty { display: none; }
.mls-manual-log {
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.mls-manual-log-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
}
.mls-manual-log-total {
    color: var(--text-muted);
    font-weight: 500;
}
.mls-manual-log-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}
.mls-manual-log-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 0.25rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.mls-manual-log-item:last-child { border-bottom: none; }
.mls-manual-log-item.is-latest {
    background: rgba(16, 185, 129, 0.10);
    box-shadow: inset 3px 0 0 var(--primary-green);
}
.mls-manual-log-name {
    color: var(--text-main);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mls-manual-log-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}
.mls-manual-log-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-green);
    white-space: nowrap;
}
.mls-manual-log-remove {
    margin-left: auto;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.mls-manual-log-remove:hover,
.mls-manual-log-remove:focus-visible {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.10);
}
/* --- MLS ROSTER TAB SPECIFIC STYLES --- */

.roster-container-wrapper {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.roster-empty-state {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1.5rem 0;
}

.status-badge-meta {
    font-size: 0.75rem;
    color: var(--primary-green);
    font-weight: 700;
    display: none;
    margin-bottom: 0.5rem;
}

/* --- COLLAPSIBLE RANKINGS CARDS (Roster/Lineup tabs) ---
   The toggle is <h3><button class="rankings-card-toggle">Title + chevron</button></h3>, with
   the freshness readout and tooltip as siblings OUTSIDE the button (a role="button" header
   used to swallow the heading and nest the tooltip control inside it). Two CSS tricks keep
   the old look and feel:
   1. The button's ::after stretches over the whole header, so clicking anywhere on it still
      toggles the card. The tooltip stays its own control without any z-index: it's positioned
      and comes after the button in the markup, so it already paints above that layer (and no
      z-index means its popup isn't trapped in a new stacking context).
   2. In the ROS/Weekly cards the chevron lives inside the button but is pinned to the header's
      right edge, where it used to sit after the tooltip. */
.rankings-card-header {
    cursor: pointer;
    position: relative;
}
.rankings-card-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.rankings-card-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
}
.settings-card.rankings-card > .rankings-card-header .chevron {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0.75rem; /* .card-header's padding-bottom: centre on the content, not the padding */
    margin: auto 0;
}
.settings-card.rankings-card:not(.expanded) > .rankings-card-header .chevron {
    bottom: 0; /* padding-bottom is 0 when collapsed (rule below) */
}
.settings-card.rankings-card > .rankings-card-header > .cluster {
    margin-right: calc(18px + var(--space-2)); /* room for the pinned chevron */
}

.rankings-card:not(.expanded) .rankings-card-body {
    display: none;
}

/* Collapsed is the usual resting state now (picking a set collapses the card), so drop the
   header's divider and gap that only exist to separate it from the hidden body. */
.settings-card.rankings-card:not(.expanded) > .rankings-card-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.header-freshness {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.header-freshness.freshness-stale {
    color: #f59e0b;
}

/* Title + "Set: <name>" line. min-width: 0 lets a long set name truncate instead of shoving
   the freshness readout and chevron off the edge on a phone. */
.rankings-header-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    margin-right: 0.5rem;
}
.rankings-header-set {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rankings-header-set:empty { display: none; }
/* Dynasty and keeper leagues with an In-Season set (improvements S23): one line per slot, each cut on its own. */
.rankings-header-slot { display: block; overflow: hidden; text-overflow: ellipsis; }
.rankings-header-set strong {
    color: var(--primary-green);
    font-weight: 600;
}

/* "Used in 2 of 5 leagues · Choose leagues..." under the set dropdown */
.mls-set-leagues-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}
.mls-set-leagues-summary {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.mls-set-leagues-row .btn-link-inline { margin-left: auto; }

/* In-Season rankings in dynasty and keeper leagues (improvements S23): the second picker in the ROS
   card, its "Your redraft leagues use …" offer and its leagues row. */
.mls-season-row {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}
/* "Upload or Auto-Fetch below to update your dynasty set, …" (round 8): ends the two pickers, starts the uploads. */
.mls-upload-target {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.mls-upload-target strong { color: var(--text-main); font-weight: 600; }
.mls-upload-target-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; margin-bottom: 0.4rem; }
.mls-upload-target-row .mls-segmented { flex: 0 1 15rem; }
.mls-upload-target-row .mls-segmented-btn { padding: 0.4rem 0.5rem; }
/* "Keeper league (each team keeps up to 3), treated as dynasty here. Change League style" (S23 round 10). */
.mls-keeper-style-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-size: 0.8rem; color: var(--text-muted); }
.mls-keeper-style-note[hidden] { display: none; }
.mls-keeper-style-note strong { color: var(--text-main); font-weight: 600; }
/* League style on the Setup tab (keeper leagues, S23 round 10): .input-group sets display, which beats [hidden]. */
#leagueStyleWrap[hidden] { display: none; }
.mls-league-style { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.25rem; margin-bottom: 0; }
/* Its rows set display (flex), which would beat the hidden attribute the code toggles. */
.mls-season-row[hidden], .mls-season-row [hidden] { display: none; }
.mls-season-row .tooltip-container { margin-bottom: 0.35rem; }
.mls-season-row label { margin-bottom: 0.35rem; }
/* "Suggested: Competing · 6–1, 2nd in points for, 1st in Start." under the switch (S23, round 7). */
.mls-competing-suggestion { display: block; margin-top: 0.3rem; }
.mls-competing-suggestion[hidden] { display: none; }
.mls-competing-suggestion strong { color: var(--text-main); font-weight: 600; }
/* The suggestion in the Your Team card (round 13), under the label's advice. */
.mls-power-summary-suggestion { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.mls-power-summary-suggestion strong { color: var(--text-main); font-weight: 600; }
/* The Roster tab's "Ranks by your dynasty rankings (…)" line (S23, round 13). */
.mls-roster-source { margin-bottom: 0.6rem; font-size: 0.8rem; color: var(--text-muted); text-align: left; }
.mls-roster-source strong { color: var(--text-main); font-weight: 600; }
/* The Lineup tab's "Ranked by your In-Season rankings (…)" line (S23, round 6). */
.mls-lineup-source {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.mls-lineup-source strong { color: var(--text-main); font-weight: 600; }
/* Power Rankings: which set gave each column, right under the table. */
.mls-power-source-key {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.mls-power-source-key strong { color: var(--text-main); font-weight: 600; }
.mls-power-key-part { display: inline-block; } /* each part wraps as one phrase where it fits */
/* Rank By in a dynasty or keeper league: "In-Season Rank" didn't fit half a phone's width. */
@media (max-width: 599.98px) {
    .settings-grid > .mls-rank-by-wide { grid-column: 1 / -1; }
}
.mls-season-offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Rename button beside a saved set's delete button (improvements S2). The border matches its fill
   so it stands as tall as the bordered .btn-danger beside it. */
.mls-rename-set-btn {
    flex-shrink: 0;
    gap: 0.3rem;
    border: 1px solid var(--border);
}

/* League checklist (upload preview + standalone picker dialog) */
.mls-league-picker { margin: 0 0 1rem 0; }
.mls-league-picker-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}
.mls-league-picker-head:has(> span:empty):not(:has(button)) { display: none; }
.mls-league-picker-list {
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
}
/* In a dialog the whole middle scrolls (improvements F10), so the list doesn't scroll on its own as well: one scroll,
   not a scroll inside a scroll. */
.preview-body .mls-league-picker-list { max-height: none; overflow: visible; }
.mls-league-picker-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.mls-league-picker-row:last-child { border-bottom: none; }
.mls-league-picker-row:hover:not(.is-locked) { background: rgba(16, 185, 129, 0.06); }
.mls-league-picker-row.is-locked { cursor: default; opacity: 0.7; }
.mls-league-picker-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--primary-green);
}
.mls-league-picker-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.mls-league-picker-name {
    font-size: 0.875rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mls-league-picker-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-input {
    cursor: pointer;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
}

/* --- LIVE INDICATOR --- */
/* goToSetupStep scrolls these into view; clear the sticky .header so the card title shows */
#setupSyncCard,
#rosRankingsCard,
#weeklyRankingsCard,
#powerRankingsCard,
#playoffPicture {
    scroll-margin-top: 5.5rem;
}

/* --- MODERNIZED FILE UPLOAD BUTTON --- */
/* Reclaim horizontal space on mobile: the MLS empty states (split from the shared block in css/base.css in 4D). */
@media (max-width: 839.98px) {
    /* Optional: Ensure the empty state messages don't force awkward sizing */
    .lineup-empty-state,
    .bench-empty-state,
    .roster-empty-state {
        padding: 1.5rem 0.5rem;
    }
}
/* #rosterList keeps .roster-empty-state once it has rows; the rows then run to the card's padding (improvements M17). */
.roster-container-wrapper .roster-empty-state:has(.roster-item) { padding: 0; }

/* --- MOBILE COLLAPSIBLE CARDS CONDITIONAL LAYOUT --- */
.custom-scrollbar::-webkit-scrollbar { width: 4px; } 
.custom-scrollbar::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }

/* --- FULL-WIDTH DRAFT BOARD FOR DESKTOP --- */
/* Accessibility: minimum touch target for the team-chip close button (split from the shared block in css/base.css in 4D). */
.close-chip {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* --- TABLE HEADER TOOLTIP FIXES --- */
/* "Did you mean" hint on a Scout card */
.scout-suggest-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.scout-suggest-link { color: #fb923c; font-weight: 600; text-decoration: underline; }
.scout-suggest-link:hover { color: #fdba74; }
/* --- WAIVER WIRE ASSISTANT: AUTO-FIND (Scout tab) ---
   Waiver Wire Assistant Auto-Find + Scan Pasted List. Cards reuse .scout-result-card; these add
   the verdict line, pills, drop-candidate box, and the Compare Against toggle. See
   autoFindWaiverUpgrades / buildWaiverContext in js/mls/scout/waivers.js. */
.mls-scan-summary { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1rem; padding: 0.75rem 0.9rem; background: rgba(255, 255, 255, 0.04); border-radius: 6px; }
.mls-scan-summary strong { color: var(--text-main); }
.mls-scan-notes { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.78rem; }
.mls-scan-notes li { margin-top: 0.2rem; }
.mls-scan-card { align-items: flex-start; gap: 0.75rem; }
.mls-scan-card-start { box-shadow: inset 3px 0 0 var(--primary-green); }
.mls-scan-main { min-width: 0; flex: 1; }
.mls-scan-ranks { margin-top: 5px; }
.mls-scan-verdict { font-size: 0.8rem; color: var(--text-main); margin-top: 6px; line-height: 1.4; }
/* Own line under the verdict sentence: at phone width these two ranks wrapped mid-phrase when
   they trailed the sentence inline. Each pair inside is .mls-nowrap, so a narrow screen breaks
   at the comma, never inside "Wk Flex:" or between a name and its rank. */
.mls-verdict-nums { display: block; color: var(--text-muted); margin-top: 2px; }
.mls-muted-rank { color: var(--text-muted); font-weight: 400; }
.mls-scan-empty { color: var(--text-muted); font-size: 0.85rem; text-align: center; padding: 1rem; }
.mls-verdict-start { background: var(--target-bg); color: var(--primary-green); border: 1px solid var(--target-border); white-space: nowrap; }
.mls-verdict-bench { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.mls-verdict-out { background: var(--avoid-bg); color: #fca5a5; border: 1px solid var(--avoid-border); white-space: nowrap; }
.mls-scan-pill-stack { margin-top: 4px; }
.mls-scan-benchmark { background: rgba(255, 255, 255, 0.05); padding: 12px; border-radius: 0 6px 6px 0; border-left: 3px solid #fca5a5; font-size: 0.85rem; color: var(--text-main); margin-bottom: 1rem; line-height: 1.5; }
.mls-scan-benchmark-title { color: #fca5a5; font-weight: bold; margin-bottom: 4px; }
.mls-scan-benchmark-ok { margin-top: 0.35rem; color: var(--primary-green); font-weight: 600; }
.mls-scan-benchmark-next { margin-top: 0.3rem; color: var(--text-muted); font-size: 0.8rem; }
.mls-scan-benchmark-lead { margin-top: 0.5rem; }
/* One "name (rank)" in Next weakest: wraps as a whole, and only breaks inside when it's wider than a line. */
.mls-scan-next-item { display: inline-block; }
/* "· 1 tier up" after a comparison verdict (improvements S8, round 2): green when he'd jump a tier. */
.mls-tier-gap { white-space: nowrap; font-weight: 600; color: var(--text-muted); }
.mls-tier-gap.is-up { color: var(--primary-green); }
/* Two-option segmented toggle (Compare Against: Starting Lineup | Whole Roster). */
/* No overflow: hidden (improvements M2): it clipped the buttons' 48px hit areas. The end buttons round their own corners
   to match the group's (8px outside, 7px inside the border). */
.mls-segmented { display: flex; border: 1px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.15); }
.mls-segmented-btn:first-child { border-radius: 7px 0 0 7px; }
.mls-segmented-btn:last-child { border-radius: 0 7px 7px 0; }
.mls-segmented-btn { flex: 1; padding: 0.6rem 0.5rem; background: transparent; color: var(--text-muted); border: none; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background var(--motion-effects-fast-ms) var(--motion-effects-fast), color var(--motion-effects-fast-ms) var(--motion-effects-fast); }
.mls-segmented-btn + .mls-segmented-btn { border-left: 1px solid var(--border); }
.mls-segmented-btn.active { background: var(--target-bg); color: var(--primary-green); }
.mls-segmented-btn:focus-visible { outline: 3px solid var(--primary-green); outline-offset: -3px; }
.mls-nowrap { white-space: nowrap; }

/* --- WAIVER WIRE ASSISTANT MODES and TOP AVAILABLE (Scout tab, improvements S1) ---
   Blocks for other modes carry [hidden]; .input-group's display:flex would otherwise win. */
[data-waiver-modes][hidden] { display: none !important; }
/* Position chips: Draft Strategist's .pos-filter buttons (css/base.css) in one row of eight, two rows of
   four on phones. */
.mls-pos-filter-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 520px) { .mls-pos-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Top Available's compact list (js/mls/scout/topAvailable.js): one boxed list per position, two
   columns on desktop in All, one column on phones. */
.mls-ta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0.75rem 1rem; }
.mls-ta-group { border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.mls-ta-head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; }
.mls-ta-title { margin: 0; font-size: 1rem; color: var(--text-main); }
.mls-ta-count { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); }
.mls-ta-more-link { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: var(--primary-green); cursor: pointer; }
.mls-ta-col { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.mls-ta-more-link + .mls-ta-col { margin-left: 0.5rem; }
.mls-ta-list { list-style: none; margin: 0; padding: 0; }
.mls-ta-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; font-size: 0.88rem; }
.mls-ta-row + .mls-ta-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.mls-ta-idx { width: 1.6rem; flex-shrink: 0; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mls-ta-player { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; }
.mls-ta-name { color: var(--text-main); font-weight: 600; }
.mls-ta-team { font-size: 0.72rem; color: var(--text-muted); }
.mls-ta-pos { padding: 1px 5px; }
.mls-ta-title-badge { font-size: 0.8rem; padding: 1px 6px; }
.mls-ta-tier { opacity: 0.8; }
.mls-ta-starts { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.72rem; font-weight: 600; color: var(--primary-green); white-space: nowrap; }
.mls-ta-num { min-width: 2.5rem; text-align: right; font-weight: 600; color: var(--text-main); font-variant-numeric: tabular-nums; }
.mls-ta-more { width: 100%; margin-top: 0.6rem; }
/* Sleeper trending adds (improvements S6): the icon on a row, the Trending view's heading, and the toggle's
   icon. #waiverTopViewWrap is an .input-group (display:flex), so its [hidden] needs the same help as the mode blocks. */
#waiverTopViewWrap[hidden] { display: none !important; }
.mls-ta-trend { display: inline-flex; align-items: center; color: var(--primary-green); cursor: help; }
.mls-ta-trend-title { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--primary-green); }
.mls-trend-icon { vertical-align: -2px; margin-right: 0.35rem; }

/* Best available in your leagues (js/mls/scout/bestAvailable.js, improvements S5): since S12 a fold in each league
   card (.mls-lc-ba), its top 3 RB/WR/TE with Top Available's rank chips, and a View button. */
.mls-ba-basis { flex: 0 0 auto; }
.mls-ba-basis .mls-segmented-btn { flex: 0 0 auto; padding: 0.3rem 0.85rem; }
.mls-ba-excluded { margin: 0.5rem 0 0.2rem; font-size: 0.78rem; color: var(--text-muted); }
.mls-ba-fold { margin: 0; padding: 0.45rem 0 0.2rem; }
.mls-ba-title { color: var(--text-main); }
.mls-ba-fold > summary .mls-ba-source, .mls-ba-flag { font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }
.mls-ba-line { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.4rem 0 0; }
.mls-ba-main { flex: 1; min-width: 0; }
.mls-ba-source { font-size: 0.72rem; color: var(--text-muted); }
.mls-ba-players { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.85rem; }
.mls-ba-player { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.3rem; }
.mls-ba-name { color: var(--text-main); white-space: nowrap; }
.mls-ba-empty { font-size: 0.8rem; color: var(--text-muted); }
.mls-ba-player.is-upgrade { gap: 0.3rem; }
.mls-ba-player.is-upgrade > svg { color: var(--primary-green); flex-shrink: 0; }
.mls-ba-player.is-upgrade .mls-ba-name { font-weight: 600; }
.mls-ba-over { font-size: 0.78rem; color: var(--primary-green); }
/* Phones: an upgrade takes its own row, with "over …" under the name; the buttons go in a row under the players,
   as the to-dos' do. */
@media (max-width: 599.98px) {
    .mls-ba-player.is-upgrade { flex-basis: 100%; }
    .mls-ba-player.is-upgrade .mls-ba-over { flex-basis: 100%; padding-left: calc(14px + 0.3rem); }
    .mls-ba-line { flex-direction: column; align-items: stretch; gap: 0.4rem; }
    .mls-ba-actions { flex-direction: row; flex-wrap: wrap; }
}
.mls-ba-actions { display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem; flex-shrink: 0; }
.mls-ba-sleeper { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; text-decoration: none; }
/* Desktop only (owner's choice): on phones and tablets the link opens the Sleeper app's home, not the league. */
@media (max-width: 599.98px), (hover: none) and (pointer: coarse) {
    .mls-ba-sleeper { display: none; }
}
.mls-ba-player .inj-badge { margin-left: 0.1rem; }
/* Free agent or Waivers (improvements S34): "FA" quiet, "W" amber, since a claim has to wait for the run. A button,
   so a tap says when it runs (like the SoS badge). */
.badge.mls-wv-chip { font-size: 0.62rem; padding: 1px 4px; margin-left: 4px; background: transparent; border: 1px solid #475569; color: var(--text-muted); }
.badge.mls-wv-chip.is-w { border-color: rgba(245, 158, 11, 0.7); color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
button.mls-wv-chip { font-family: inherit; line-height: inherit; cursor: pointer; }
.mls-ba-player .mls-wv-chip { margin-left: 0; }
/* A waiver player too late for this week (S34): muted, not counted; an upgrade says "too late for this week". */
.mls-ba-player.is-late { opacity: 0.55; }
.mls-ba-player.is-late .mls-ba-name { font-weight: 400; }
.mls-ba-late { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
/* An upgrade on waivers: until when, on his own line, in the W chip's amber (round 3). */
.mls-ba-wv-when { color: #fbbf24; white-space: nowrap; }
/* A suggested FAAB bid (improvements S35): amber text like the W chip it follows, dotted underline since a tap says
   what it's based on. An upgrade's "Bid 9–14 (of your 63 left)" takes its own row on phones, under "over …". */
button.mls-faab-bid, .mls-faab-bid { font: inherit; font-size: 0.78rem; font-weight: 600; color: #fbbf24; background: none; border: 0; padding: 0;
    text-decoration: underline dotted rgba(251, 191, 36, 0.6); text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.mls-scan-bid { margin-top: 4px; }
/* Too few bids near his rank (round 2): a rough guess, "≈ Bid 2–5", in the muted text colour. */
button.mls-faab-bid.is-rough, .mls-faab-bid.is-rough { color: var(--text-muted); text-decoration-color: rgba(148, 163, 184, 0.6); font-weight: 500; }
/* While the league's history loads (round 5): the row is already there, muted, so the page doesn't jump when it arrives. */
.mls-faab-bid.is-pending { color: var(--text-muted); text-decoration: none; cursor: default; font-weight: 500; }
/* Desktop: "over … · waivers until … · Bid 13–21": the dot keeps the bid from running into the line before it. */
.mls-ba-bid-sep { font-size: 0.78rem; color: var(--text-muted); }
/* The bid's sheet (round 2): what it's based on, then what raised it (green up arrow) and lowered it (red down arrow),
   then the notes, muted. */
.mls-faab-sheet { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.95rem; line-height: 1.45; color: var(--text-main); }
.mls-faab-sheet li { display: flex; gap: 0.5rem; align-items: flex-start; }
.mls-faab-sheet li > svg { flex-shrink: 0; margin-top: 0.2em; }
.mls-faab-sheet .is-base { font-weight: 600; padding-bottom: 0.2rem; }
/* The basis line's second sentence (how the bids are weighted, or why it's a rough guess; round 9): not bold. */
.mls-faab-sheet .mls-faab-sub { font-weight: 400; }
.mls-faab-sheet .mls-faab-list { list-style: disc; margin: 0.2rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.1rem; }
.mls-faab-sheet .mls-faab-list li { display: list-item; }
.mls-faab-sheet li > span { min-width: 0; }
.mls-faab-sheet .is-up > svg { color: var(--primary-green); }
.mls-faab-sheet .is-down > svg { color: #ef4444; }
.mls-faab-sheet .is-note { font-size: 0.85rem; color: var(--text-muted); }
/* The league and what you have left (round 3), first, muted. */
.mls-faab-sheet .is-where { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 599.98px) {
    /* Its own row: 8px below it so the next player's chips (their 48px areas reach up 16px) don't cover it. */
    .mls-ba-bid-sep { display: none; }
    .mls-ba-player.is-upgrade .mls-faab-bid { flex-basis: 100%; text-align: left; padding-left: calc(14px + 0.3rem); margin-bottom: 0.5rem; }
}
/* After the week's games: one line for everyone who played, instead of a W on each (round 5). */
.mls-ba-wv-note { margin-bottom: 0.2rem; font-size: 0.78rem; color: #fbbf24; }
@media (max-width: 599.98px) {
    .mls-ba-player.is-late-upgrade { flex-basis: 100%; }
    .mls-ba-player.is-late-upgrade .mls-ba-late { flex-basis: 100%; padding-left: calc(14px + 0.3rem); order: 1; }
}
.mls-ba-dismiss { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 0.1rem; border-radius: 50%; color: var(--text-muted); opacity: 0.6; cursor: pointer; }
.mls-ba-dismiss:hover, .mls-ba-dismiss:focus-visible { opacity: 1; color: var(--text-main); background: rgba(255, 255, 255, 0.08); }
.mls-ba-shared { margin-bottom: 0.2rem; font-size: 0.78rem; color: var(--primary-green); }
.mls-ba-dismissed { margin-top: 0.25rem; font-size: 0.75rem; color: var(--text-muted); }
.mls-ba-restore { font-size: 0.75rem; font-weight: 600; color: var(--primary-green); cursor: pointer; text-decoration: underline; }

/* Lineups that need you (js/mls/render/dashboard.js, improvements S11). Since S12 the box under Optimize All / Sync
   All is a one-line strip (the count, ✕, "Sync All again"), and each league's to-dos sit in its card: what to do, its
   first kickoff and the buttons that fix it, then its Sleeper changes, folded. Each item takes the Lineup tab's color
   for it (the injury warning's red, the IR badge's purple), so an activation reads the same in both places. */
/* "Last synced 9:42 AM" under Sync All / Optimize All (improvements S46). Its colors are .freshness-ok / -stale and
   .sync-failed (css/base.css); centered under the two buttons, the failed league after the time, wrapping on phones. */
.mls-last-synced { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.9em; row-gap: 0.125rem; margin: -0.25rem 0 0.75rem; font-size: 0.85rem; text-align: center; }
.mls-last-synced[hidden] { display: none; }
.mls-last-synced > span { display: inline-flex; align-items: center; gap: 0.3em; }
.mls-last-synced svg { flex: none; }
.mls-needs-box { margin-bottom: 0.75rem; border-radius: 8px; background: var(--surface-inset); padding: 0.5rem 0.75rem; }
.mls-needs-box[hidden] { display: none; }
.mls-needs-head { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.mls-needs-head > svg { flex-shrink: 0; color: var(--text-muted); }
.mls-needs-box.has-problems .mls-needs-head > svg { color: #f59e0b; }
.mls-needs-title { flex: 1; min-width: 0; }
.mls-needs-title-more { font-weight: 400; color: var(--text-muted); }
.mls-needs-close { flex-shrink: 0; }
.mls-needs-jump { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.8rem; font-weight: 600; color: var(--primary-green); text-decoration: underline; cursor: pointer; white-space: nowrap; }
.mls-needs-line { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.45rem 0 0.2rem; }
.mls-needs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.mls-needs-head-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.1rem 0.5rem; }
.mls-needs-label { font-weight: 600; color: var(--text-muted); font-size: 0.82rem; }
.mls-lc-card.needs-you .mls-needs-label { color: #f59e0b; }
.mls-needs-when { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.mls-needs-when.is-soon { color: #f59e0b; font-weight: 600; }
.mls-needs-items { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.mls-needs-items.is-stacked { display: flex; flex-direction: column; gap: 0.15rem; }
.mls-needs-item.is-injured, .lineup-needs-item.is-injured { color: #fca5a5; }
.mls-needs-item.is-ir, .lineup-needs-item.is-ir { color: #d6bcfa; }
.mls-needs-item.is-sleeper { color: var(--text-main); }
/* Bye Crunch (improvements S52): a coming week byes leave short. The BYE badge's orange, a user-minus icon before it. */
.mls-needs-item.is-crunch, .lineup-needs-item.is-crunch { color: #fdba74; }
.mls-crunch-icon { color: #fb923c; vertical-align: -2px; margin-right: 0.3rem; }
/* A week's rows (round 4): the slot a shade brighter, its Find button, then a bullet per player (round 5). */
.mls-crunch-list { margin: 0.25rem 0 0; padding-left: 1.3rem; list-style: none; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.35rem; }
.mls-crunch-list li { line-height: 1.45; }
.mls-crunch-head { color: var(--text-main); font-weight: 600; }
.mls-crunch-list .mls-crunch-find { margin-left: 0.35rem; font-size: 0.75rem; padding: 2px 10px; }
.mls-crunch-players { margin: 0.1rem 0 0; padding-left: 1.1rem; list-style: disc; display: flex; flex-direction: column; gap: 0.05rem; }
/* The fold (rounds 4 and 5, the Lineup box and the league card): the "What changed?" fold's chevron, in the item's
   orange and weight. */
.mls-change-fold.mls-crunch-fold { margin-top: 0; }
.mls-change-fold.mls-crunch-fold > summary { color: inherit; font-size: inherit; font-weight: inherit; flex-wrap: nowrap; gap: 0.3rem; }
.mls-crunch-fold > summary .mls-crunch-icon { margin-right: 0; flex-shrink: 0; }
/* Got it (round 7): after the rows, with what it does beside it. */
.mls-crunch-dismiss { margin: 0.4rem 0 0 1.3rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.5rem; font-size: 0.75rem; color: var(--text-muted); }
.mls-crunch-dismiss .mls-crunch-got-it { font-size: 0.75rem; padding: 2px 10px; }
/* Top Available opened from Bye Crunch (round 7): the week it's for, and Show all. */
.mls-ta-week { margin: 0 0 0.6rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.3); color: #fdba74; font-size: 0.82rem; line-height: 1.45; }
.mls-ta-week .mls-ta-more-link { margin-left: 0.3rem; }
.mls-needs-hurt { color: #fca5a5; font-weight: 600; }
.mls-needs-why { color: var(--text-muted); }
.mls-needs-item.is-kept, .lineup-needs-item.is-kept, .mls-needs-item.is-unmatched, .lineup-needs-item.is-unmatched { opacity: 0.7; font-style: italic; }
.mls-needs-sep { color: var(--text-muted); opacity: 0.7; }
.mls-needs-actions { flex-shrink: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem; }
.mls-needs-actions .btn { white-space: nowrap; }
/* Phones: the buttons go in a row under the league's items, so the items get the full width and the buttons sit
   with the league they're for rather than beside whichever item lines up with them (owner's request, S11 round 6). */
@media (max-width: 599.98px) {
    .mls-needs-line { flex-direction: column; align-items: stretch; gap: 0.4rem; }
    .mls-needs-actions { flex-direction: row; flex-wrap: wrap; }
}
.mls-needs-sleeper { margin: 0; padding: 0.45rem 0 0.2rem; }
.mls-needs-sleeper .mls-needs-line { padding-top: 0.3rem; }
.mls-needs-note { margin: 0.2rem 0 0; font-size: 0.75rem; color: var(--text-muted); }
.mls-needs-check { margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--text-muted); }
.mls-needs-check-link { color: var(--primary-green); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* The League Command Center's league cards (js/mls/render/leagueCards.js, improvements S12): one per league, in your
   order. A header (fold chevron, the name as the switch-league button with its format and sync age, ▲ ▼ ✕), a status
   row (chips, EARLY or BB, "2 to do" and "1 upgrade"), and a body with the to-dos and Best Available, side by side
   when there's room. The active league has the table's green edge; a league that needs you an amber border. */
.mls-lc-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.75rem; margin-bottom: 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.mls-lc-toolbar-ba { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.6rem; flex: 1 1 auto; min-width: 0; }
.mls-lc-toolbar-ba[hidden] { display: none; }
.mls-lc-toolbar-summary { min-width: 0; }
.mls-lc-toolbar-buttons { margin-left: auto; display: inline-flex; gap: 0.9rem; }
.mls-lc-fold-all { color: var(--primary-green); font-weight: 600; text-decoration: underline; cursor: pointer; white-space: nowrap; }
/* League rows (improvements M17): list rows with a divider inside the Command Center's card. The active league keeps its
   3px green edge, a league that needs you a 3px amber one (amber wins on the active league until nothing is left). */
.mls-lc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mls-lc-card { position: relative; padding: 0.55rem 0 0.6rem; min-width: 0; }
.mls-lc-card + .mls-lc-card { border-top: 1px solid var(--divider); }
.mls-lc-card.is-active { box-shadow: inset 3px 0 0 var(--primary-green); }
.mls-lc-card.needs-you { box-shadow: inset 3px 0 0 #f59e0b; }
.mls-lc-head { display: flex; align-items: flex-start; gap: 0.4rem; }
.mls-lc-fold { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text-muted); cursor: pointer; }
.mls-lc-fold:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.06); }
/* The chevron turns with the card's fold at the card's speed (S16, owner's request): the shared .chevron rule since
   improvements F11 (css/base.css, CHEVRONS), which every other chevron now follows too. */
.mls-lc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mls-lc-name-btn { align-self: flex-start; max-width: 100%; display: block; padding: 0.2rem 0; background: none; border: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.mls-lc-record { font-weight: 600; font-variant-numeric: tabular-nums; }
.mls-direction-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0; font: inherit; font-weight: 600; border: 0; background: none; cursor: pointer; vertical-align: baseline; }
.mls-direction-badge.is-competing { color: color-mix(in srgb, #34d399 70%, var(--text-muted)); }
.mls-direction-badge.is-rebuilding { color: color-mix(in srgb, #60a5fa 70%, var(--text-muted)); }
.mls-direction-badge .mls-direction-go { opacity: 0.75; }
span.mls-direction-badge { cursor: default; }
.mls-lc-name { color: var(--text-main); font-size: 0.95rem; overflow-wrap: break-word; }
.mls-lc-meta { position: relative; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.7rem; font-size: 0.75rem; color: var(--text-muted); overflow-wrap: anywhere; }
.mls-lc-sep { opacity: 0.7; }
.mls-lc-controls { flex-shrink: 0; display: flex; align-items: center; gap: 0.3rem; }
.mls-lc-controls .btn-sm { padding: 0.3rem 0.5rem; }
/* Edit mode with Competing (S53) is five buttons: on a phone they get their own row under the name, so it keeps its width. */
.mls-lc-paid.mls-lc-competing.is-on { color: #34d399; border-color: rgba(52, 211, 153, 0.6); }
@media (max-width: 599.98px) {
    .mls-lc-head { flex-wrap: wrap; }
    .mls-lc-controls { flex-basis: 100%; padding-left: 1.9rem; }
    /* ▲ ▼ ✕ stay at the right edge whether or not Competing is there; every button at least 36px to tap. */
    .mls-lc-controls [data-action="moveLeague"][data-direction="-1"] { margin-left: auto; }
    .mls-lc-controls .btn-sm { min-height: 2.25rem; min-width: 2.25rem; }
}
.mls-lc-delete { margin-left: 0.15rem; }
.mls-lc-status { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0 0 calc(28px + 0.4rem); }
.mls-lc-status .early-badge { margin-left: 0; }
/* A chip's tooltip opens under the status row, from its left edge, so it never runs off a phone's screen (the
   site-wide tooltip hangs left from its trigger's right edge, which for a chip near the card's left edge is past
   the screen's). */
.mls-lc-status { position: relative; }
.mls-lc-status > .tooltip-container { position: static; }
.mls-lc-status > .tooltip-container > .tooltip-text { left: 0; right: auto; width: min(260px, 100%); }
.mls-lc-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 2px 8px 2px 2px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.75rem; color: var(--text-main); }
.mls-lc-chip .status-icon { width: 20px; height: 20px; }
.mls-lc-chip .status-icon svg { width: 12px; height: 12px; }
.mls-lc-counts { display: inline-flex; align-items: center; gap: 0.6rem; margin-left: auto; font-size: 0.75rem; font-weight: 600; }
.mls-lc-count-todo { color: #f59e0b; }
/* A change to set needs you as much as a fix (improvements F12, owner's choice (a)): amber too. */
.mls-lc-count-sleeper { color: #f59e0b; }
.mls-lc-count-upgrades { color: var(--primary-green); }
.mls-lc-count-upgrades:empty { display: none; }
/* This visit's Sync All roster changes (round 8), in the Sync Logs' colors, except a newly out player: muted, not the
   injury red (owner's choice, round 10). It's news; red is for what you have to act on, like "Bench X (Out)". */
.mls-lc-synced { margin: 0.35rem 0 0 calc(28px + 0.4rem); font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.mls-lc-synced-label { font-weight: 600; }
/* An early-game swap to make (improvements S50, round 5): muted, like the Synced line; a suggestion, never amber. */
.mls-lc-early { margin: 0.35rem 0 0 calc(28px + 0.4rem); font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
/* Playoff chances (improvements S55): the playoff number in the shared chance colors, bye and title plain. */
.mls-lc-odds { margin: 0.35rem 0 0 calc(28px + 0.4rem); font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; font-variant-numeric: tabular-nums; }
.mls-lc-odds-part { white-space: nowrap; }
.mls-lc-odds .mls-week-chance { margin-left: 0; }
.mls-lc-odds strong { color: var(--text-main); }
/* Once you're eliminated, a folded card leaves the line out (round 2); unfold it to see it. */
.mls-lc-card.is-collapsed .mls-lc-odds.is-out { display: none; }
.mls-lc-synced-add { color: #86efac; }
.mls-lc-synced-drop { color: #9ca3af; }
.mls-lc-synced-out { color: var(--text-muted); }
.mls-lc-body { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.45rem; border-top: 1px solid var(--border); }
.mls-lc-body[hidden] { display: none; }
.mls-lc-todo, .mls-lc-ba { flex: 1 1 320px; min-width: 0; }
.mls-lc-ba:empty { display: none; }
/* In a card that's open for its to-dos, a best available with no upgrade (folded by default) is left out: a row per
   card that said nothing (round 6). A card with nothing else keeps it, so opening a quiet card still shows it. The
   whole section goes, not just its fold: an empty section still took half the row on desktop, which left the to-dos'
   "Open lineup" in the middle of the card (round 7). */
.mls-lc-todo + .mls-lc-ba:has(> .mls-ba-fold[data-default="false"]) { display: none; }
/* Phones: the status row starts at the card's edge, under the chevron, so the chips get the full width. */
@media (max-width: 599.98px) {
    .mls-lc-card { padding-top: 0.5rem; padding-bottom: 0.55rem; padding-left: 12px; padding-right: 12px; }
    .mls-lc-status, .mls-lc-synced, .mls-lc-early, .mls-lc-odds { margin-left: 0; }
}

/* --- SCOREBOARD (js/mls/week/thisWeek.js, improvements S21) ---
   The Scoreboard tab: a header (week, record, Provisional / Final, Refresh), the splits, the matchups still in play, then
   every league as a tile, closest first. And its two pointers: the Dashboard's one line and the Lineup tab's strip. */
.mls-week-head { display: flex; align-items: center; gap: 0.4rem 0.6rem; flex-wrap: wrap; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.mls-week-heading { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.15rem 0.6rem; }
.mls-week-title { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
/* ‹ Week 7 Recap › (improvements S28): the week's arrows hug the title; a disabled one fades but keeps its place. */
.mls-week-nav { display: inline-flex; align-items: center; gap: 0.15rem; margin-left: -0.35rem; }
/* With the arrows the heading is wider than a phone's row: it shrinks (the summary wraps under the title) rather than
   pushing (i) and Refresh onto a line of their own. */
.mls-week-head .mls-week-heading { flex-basis: 0; }
.mls-week-step { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; border-radius: 50%; color: var(--primary-green); cursor: pointer; }
/* Its 48px tap area around the 32px button is the shared one (css/base.css, TOUCH TARGETS; improvements M2). */
/* "Back to week 9" on a past week: a small text link after the arrows. */
.mls-week-back { color: var(--primary-green); font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0.2rem 0.1rem; white-space: nowrap; }
.mls-week-back:hover { text-decoration: underline; }
/* The last week drawn, dimmed while the chosen one loads. */
.mls-week-body.is-stale { opacity: 0.45; transition: opacity var(--motion-effects-default-ms) var(--motion-effects-default); pointer-events: none; }
.mls-week-step:disabled { color: var(--text-muted); opacity: 0.4; cursor: default; }
.mls-week-summary { font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mls-week-info { flex-shrink: 0; }
/* Provisional / Final and Refresh wrap together, so Refresh never sits on a line alone. */
.mls-week-actions { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.6rem; }
.mls-week-refresh { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--primary-green); font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0.2rem 0.1rem; }
.mls-week-refresh:disabled { opacity: 0.6; cursor: default; }
.mls-week-status { font-size: 0.7rem; padding: 2px 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.mls-week-status.is-provisional { color: #f59e0b; border-color: rgba(245, 158, 11, 0.6); background: rgba(245, 158, 11, 0.12); }
.mls-week-status.is-final { color: var(--text-muted); border-color: var(--border); background: rgba(255, 255, 255, 0.04); }
.mls-week-body { padding-top: 0.6rem; font-size: 0.85rem; }
.mls-week-splits { margin: 0 0 0.2rem; font-variant-numeric: tabular-nums; }
/* The record's splits as chips (round 9: a line of text per split read as a plain stack). */
.mls-week-splits-row { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; margin: 0 0 0.35rem; }
/* One segmented pill per group: its parts share a border with a divider between them, so they read as one whole. */
.mls-week-split-group { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.mls-week-split { display: inline-flex; align-items: baseline; gap: 0.35rem; padding: 2px 10px; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mls-week-split + .mls-week-split { border-left: 1px solid var(--border); }
.mls-week-split-of { display: inline-flex; align-items: center; padding: 2px 10px 2px 0; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.mls-week-split-label { font-weight: 500; color: var(--text-muted); }
.mls-week-hint { display: flex; align-items: flex-start; gap: 0.5rem; }
.mls-week-hint-close { flex-shrink: 0; color: var(--text-muted); cursor: pointer; padding: 0 0.25rem; line-height: 1.4; }
.mls-week-hint-close:hover { color: var(--text-main); }
.mls-week-sub { margin: 0.8rem 0 0.4rem; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.mls-week-swings, .mls-week-notes, .mls-week-tiles { list-style: none; margin: 0; padding: 0; }
.mls-week-swings { display: flex; flex-direction: column; gap: 0.45rem; }
.mls-week-swing { border-left: 3px solid #f59e0b; padding: 0.15rem 0 0.15rem 0.55rem; }
.mls-week-swing-head { display: flex; align-items: baseline; gap: 0.5rem; }
.mls-week-swing-head .mls-week-line-name { flex: 0 1 auto; min-width: 0; }
.mls-week-name { color: var(--text-main); font-weight: 600; overflow-wrap: break-word; }
.mls-week-margin { flex-shrink: 0; font-size: 0.78rem; color: var(--primary-green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mls-week-margin.is-behind { color: #ef4444; }
.mls-week-swing-score { color: var(--text-main); font-variant-numeric: tabular-nums; }
.mls-week-chance { margin-left: 0.5rem; font-weight: 700; color: var(--primary-green); white-space: nowrap; }
.mls-week-swing-live { font-size: 0.8rem; color: var(--text-muted); }
.mls-week-side { font-weight: 600; color: var(--text-main); }
.mls-week-pos { font-size: 0.7rem; color: var(--text-muted); }
.mls-week-swing-note { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.mls-week-decided { margin: 0.5rem 0 0; }
/* Every league as a tile: one per row on phones, at most four across on wider screens (owner, round 10: five felt
   crowded), rows as tall as their tallest tile. A colored edge for the result (green ahead, red behind, grey tied or before kickoff, blue guillotine). */
.mls-week-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 1.5rem) / 4)), 1fr)); gap: 0.5rem; }
.mls-week-tile { min-width: 0; display: flex; }
.mls-week-tile-btn {
    flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.5rem; row-gap: 0.1rem; align-items: baseline;
    grid-template-areas: "top you" "opp theirs" "foot foot";
    /* A tile in a taller row keeps its lines together and its foot at the bottom, instead of spreading the gap out. */
    grid-template-rows: auto auto 1fr;
    text-align: left; padding: 0.45rem 0.55rem 0.5rem; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px;
    background: rgba(0, 0, 0, 0.15); color: inherit; font: inherit; cursor: pointer;
}
.mls-week-tile-btn:hover { background: rgba(255, 255, 255, 0.04); }
.mls-week-tile.is-win .mls-week-tile-btn { border-left-color: #10b981; }
.mls-week-tile.is-loss .mls-week-tile-btn { border-left-color: #ef4444; }
.mls-week-tile.is-guillotine .mls-week-tile-btn { border-left-color: #60a5fa; }
/* The name runs as text with the "$" badge after its last word, so a paid league's name starts where every other
   one does (round 9: a badge before it, or a flex column beside it, made the names look uneven). */
.mls-week-tile-top { grid-area: top; min-width: 0; line-height: 1.25; }
.mls-week-tile-top .mls-week-name { font-size: 0.85rem; }
.mls-week-tile-top .mls-paid-badge { vertical-align: 1px; }
.mls-week-tile-who { min-width: 0; display: flex; font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.mls-week-tile-opp { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mls-week-tile-fmt { flex-shrink: 0; margin-left: 0.3em; }
.mls-week-tile-who { grid-area: opp; }
.mls-week-tile-pts { grid-area: theirs; text-align: right; font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mls-week-tile-pts.is-you { grid-area: you; color: var(--text-main); font-weight: 700; font-size: 0.9rem; }
/* The foot: the result chip and margin, then the notes, and a chevron in the bottom-right corner (it opens the lineup). */
.mls-week-tile-foot { grid-area: foot; align-self: end; display: flex; align-items: flex-end; gap: 0.5rem; padding-top: 0.2rem; font-size: 0.72rem; color: var(--text-muted); }
.mls-week-tile-notes { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.mls-week-tile-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.3rem; }
.mls-week-tile-go { margin-left: auto; flex-shrink: 0; color: var(--text-muted); }
.mls-week-tile-btn:hover .mls-week-tile-go { color: var(--text-main); }
/* Phones: one league per row. */
@media (max-width: 599.98px) {
    .mls-week-tiles { grid-template-columns: minmax(0, 1fr); }
}
.mls-week-tile-margin { color: var(--primary-green); font-variant-numeric: tabular-nums; font-weight: 600; }
.mls-week-tile-margin.is-behind { color: #ef4444; }
.mls-week-tile-chance { color: var(--primary-green); font-weight: 700; white-space: nowrap; }
/* Under 50% (S36 round 5): red, as the margin when behind. */
.mls-week-tile-chance.is-dog, .mls-week-chance.is-dog { color: #ef4444; }
.mls-week-show-all { margin: 0.45rem 0 0; color: var(--primary-green); font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0.2rem 0; }
.mls-week-result { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; font-size: 0.7rem; font-weight: 700; border-radius: 4px; padding: 1px 0; }
.mls-week-result.is-win { color: #10b981; background: rgba(16, 185, 129, 0.15); }
.mls-week-result.is-loss { color: #ef4444; background: rgba(239, 68, 68, 0.15); }
.mls-week-result.is-tie { color: var(--text-muted); background: rgba(255, 255, 255, 0.06); }
.mls-week-override { margin: 0 0 0.5rem; padding: 0.35rem 0.55rem; border: 1px dashed rgba(96, 165, 250, 0.6); border-radius: 6px; color: #93c5fd; font-size: 0.78rem; }
.mls-week-notes { display: flex; flex-direction: column; margin-top: 0.75rem; gap: 0.25rem; font-size: 0.8rem; color: var(--text-muted); }
.mls-week-failed { color: #f87171; }
.mls-week-foot { margin: 0.5rem 0 0; font-size: 0.75rem; }
/* The Dashboard's line, opening the Scoreboard. */
/* Inside the Command Center's card: one shade lighter, no border (improvements M17). */
.mls-week-summary-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.6rem; width: 100%; margin: 0 0 0.75rem; padding: 0.55rem 0.7rem; border: 0; border-radius: 8px; background: var(--surface-inset); color: var(--text-main); font: inherit; text-align: left; cursor: pointer; }
.mls-week-summary-line[hidden] { display: none; }
.mls-week-summary-line > svg:first-child { color: var(--primary-green); flex-shrink: 0; }
.mls-week-summary-title { font-weight: 700; }
.mls-week-summary-go { margin-left: auto; display: inline-flex; align-items: center; gap: 0.15rem; color: var(--primary-green); font-size: 0.8rem; font-weight: 600; }
/* The Lineup tab's strip: this league's matchup. */
.mls-matchup-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.5rem; width: 100%; margin: 0 0 0.9rem; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.15); color: var(--text-main); font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer; }
.mls-matchup-strip[hidden] { display: none; }
.mls-matchup-strip:hover { background: rgba(255, 255, 255, 0.04); }
.mls-strip-main { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.5rem; min-width: 0; }
.mls-strip-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.mls-matchup-strip > svg { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }
/* Phones: the status, chance and median on a line of their own under the score (the chevron stays on the first line). */
@media (max-width: 599.98px) {
    .mls-strip-main { flex: 1 1 0; }
    .mls-matchup-strip > svg { order: 1; }
    .mls-strip-meta { order: 2; flex-basis: 100%; }
    .mls-strip-sub { order: 3; }
}
.mls-strip-week { color: var(--text-muted); font-size: 0.78rem; }
.mls-strip-opp { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mls-strip-score { font-variant-numeric: tabular-nums; }
.mls-strip-sub { flex-basis: 100%; font-size: 0.78rem; color: var(--text-muted); }
.mls-strip-status { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.mls-strip-meta .mls-week-chance { margin-left: 0; }
@media (max-width: 599.98px) { .mls-week-refresh-label { display: none; } .mls-week-refresh { padding: 0.3rem; } }
/* "$" on a paid league (Edit mode's "$ Paid"): on its league card's name and its This week lines. */
.mls-paid-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.05rem; padding: 0 4px; font-size: 0.7rem; font-weight: 700; line-height: 1.35; color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.5); border-radius: 4px; vertical-align: 1px; }
.mls-lc-paid.is-on { color: #fbbf24; border-color: rgba(251, 191, 36, 0.6); }
/* The Roster tab's season record under the league name (S21). */
.mls-roster-head { align-items: flex-start; }
.mls-roster-titles { min-width: 0; flex: 1 1 auto; }
/* The record line: items split by a muted dot. Each item's dot sits in the gap before it, and the list starts one gap
   to the left inside a clipped box, so the dot of whichever item starts a line (the first, or one that wrapped) is
   cut off. PF and PA are one item, so they wrap together. */
.mls-roster-record { margin: 0.35rem 0 0; overflow: hidden; font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mls-roster-record[hidden] { display: none; }
.mls-roster-record-list { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 0.2rem; margin-left: -1.1rem; }
.mls-roster-record-part { position: relative; padding-left: 1.1rem; white-space: nowrap; }
.mls-roster-record-part::before { content: '\00b7'; position: absolute; left: 0.45rem; opacity: 0.7; }
.mls-roster-record-dot { margin: 0 0.45rem; opacity: 0.7; }
.mls-roster-record-wl { color: var(--text-main); font-size: 0.95rem; }
.mls-roster-record abbr { text-decoration: none; }
.mls-roster-record-odds .mls-week-chance { margin-left: 0; }
/* A link to the Playoff picture (round 7): the record's own text, underlined like a link. */
.mls-roster-odds-link { font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.mls-roster-odds-link:hover { color: var(--text-main); }
/* The Playoff picture under Power Rankings (improvements S55, round 2): standings order, a dashed line where the
   playoffs cut off, your row like Power Rankings' (.mls-power-you). */
.mls-playoff-picture { margin-top: 1rem; }
.mls-playoff-picture[hidden] { display: none; }
.mls-change-fold.mls-pp > summary { font-size: 0.95rem; color: var(--text-main); }
.mls-pp-facts { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); }
.mls-pp-wrap { margin-top: 0.5rem; overflow-x: auto; max-width: 40rem; } /* columns together on wide screens (round 4) */
.mls-pp-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.mls-pp-table th { padding: 0.35rem 0.5rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.mls-pp-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
.mls-pp-table .mls-pp-team { text-align: left; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mls-pp-table .mls-pp-num { text-align: right; white-space: nowrap; }
.mls-pp-table .mls-week-chance { margin-left: 0; }
.mls-pp-table .mls-pp-dim { color: var(--text-muted); font-weight: 400; }
/* A division leader (round 6): before the name, so a long name's ellipsis never hides it. */
.mls-pp-star { margin-right: 0.3rem; color: var(--primary-green); }
.mls-pp-table tr[data-you] td { background: rgba(147, 197, 253, 0.08); font-weight: 700; }
.mls-pp-table tr.mls-pp-first-out td { border-top: 2px dashed var(--text-muted); }
.mls-pp-note { max-width: 40rem; margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.45; }
@media (max-width: 599.98px) {
    .mls-pp-table th, .mls-pp-table td { padding-left: 0.3rem; padding-right: 0.3rem; }
    .mls-pp-table .mls-pp-team { max-width: 7.5rem; }
}
/* Phones: the name across the card, then the format, then the record (S21, owner's request). */
@media (max-width: 599.98px) {
    .mls-roster-head h3 { display: block; }
    .mls-roster-head #rosterFormatBadge { display: block; margin: 0.15rem 0 0; }
}

/* --- ALL-LEAGUES PLAYER SEARCH (Scout tab, Scan Pasted List -> "All My Leagues") ---
   One card per player, with a per-league ownership row beneath the header. Markup comes from
   runAllLeaguesSearch in js/mls/scout/allLeaguesSearch.js. The card is deliberately its own box rather than a
   .scout-result-card: those are single-line summaries, while each of these carries a variable
   number of league rows and needs a header/body split to stay readable at five-plus leagues. */
.mls-league-search-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.mls-league-search-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
}
.mls-league-search-name {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.mls-league-search-team { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

/* Rows sit on a slightly recessed panel so the per-league list reads as the card's body
   rather than as more header content. */
.mls-league-search-rows {
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border);
}
.mls-league-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-left: 3px solid transparent;
}
.mls-league-search-row + .mls-league-search-row { border-top: 1px solid var(--border); }
/* Only the actionable row gets a colored edge -- marking every status would turn the list
   into a stripe chart and bury the one row worth acting on. */
.mls-league-search-free { border-left-color: var(--primary-green); }
.mls-league-search-meta { min-width: 0; }
.mls-league-search-league { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.mls-league-search-format { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.mls-league-search-active {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--primary-green);
    border: 1px solid var(--target-border);
    background: var(--target-bg);
    border-radius: 999px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: middle;
}
.mls-league-search-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
/* Recommended row for the chosen Buy/Sell intent (see buildPowerRead in js/mls/power/allLeagues.js). Wins over the
   green free-agent edge: when a Buy/Sell verdict exists, it's the more specific signal. */
.mls-league-search-row.mls-league-search-rec { border-left-color: #a78bfa; background: rgba(167, 139, 250, 0.06); }

/* Per-league Positional Power Rank line + verdict, under the league name. Tier colors match the
   Positional Power Rankings table's own green / neutral / red cells. */
.mls-power-line { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.mls-power-line strong { font-weight: 700; }
.mls-power-strong { color: #4ade80; }
.mls-power-middle { color: var(--text-main); }
.mls-power-weak { color: #fca5a5; }
.mls-power-arrow { opacity: 0.6; }
.mls-power-src {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 4px;
    padding: 0 4px;
    margin-left: 2px;
    cursor: help;
}
.mls-power-verdict {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.mls-power-chip {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 6px;
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.mls-power-chip-rec {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.5);
}
/* Leagues scored without their own ROS rankings (market fallback) or not at all -- see
   renderPowerSourceNote in js/mls/power/allLeagues.js. Amber to match the "mkt" tag it explains. */
.mls-power-note {
    font-size: 0.72rem;
    color: #fbbf24;
    margin-top: 4px;
    line-height: 1.4;
}
.mls-power-summary { font-size: 0.8rem; color: var(--text-main); margin-top: 6px; line-height: 1.5; }
.mls-power-summary-none { color: var(--text-muted); }

/* Neutral fourth state alongside status-avail/owned/mine: a league that structurally can't
   answer the availability question (manual or handoff leagues store only your own players). */
.mls-status-unknown {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

@media (max-width: 520px) {
    /* At phone width the status pill plus a Switch button crowds the league name off its
       line; stacking the row keeps both the name and its format badge fully readable. */
    .mls-league-search-row { align-items: flex-start; flex-direction: column; }
    .mls-league-search-actions { width: 100%; justify-content: space-between; }
}

/* --- POSITIONAL POWER RANKINGS (Roster tab) ---
   Markup from renderPowerRankingsTable in js/mls/power/rosterCard.js. Replaces the old inline-styled table. Cell
   colors are the same green / neutral / red thirds powerTier() uses everywhere else.
   overflow: visible so the player tooltips aren't clipped by the table wrapper. */
.mls-power-table-wrap { overflow: visible; } /* no frame inside its card (improvements M17): the rows' dividers do */
.mls-power-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.9rem; }
.mls-power-table th {
    padding: 10px 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border);
}
.mls-power-table td { padding: 10px 6px; border-bottom: 1px solid var(--border); font-weight: 600; }
.mls-power-table tbody tr:last-child td { border-bottom: none; }
.mls-power-table .mls-power-manager { text-align: left; padding-left: 10px; }
.mls-power-owner { color: var(--text-main); font-weight: 500; display: block; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mls-power-you td { background: rgba(147, 197, 253, 0.08); }
.mls-power-you .mls-power-owner { font-weight: 700; }
.mls-power-strong-col { font-weight: 800; }
.mls-power-cell-strong { color: #4ade80; }
.mls-power-cell-middle { color: var(--text-main); }
.mls-power-cell-weak { color: #fca5a5; }
/* Table tooltips: display:none (not the site-wide visibility:hidden) while closed, because a
   hidden-but-laid-out tooltip that opens rightward still widens the page and lets it scroll
   sideways on a phone. Selectors carry .mls-power-table .tooltip-container so they outrank the
   site-wide .tooltip-container .tooltip-text rule. Left-hand columns open rightward, the rest
   leftward (see buildTooltip in renderPowerRankingsTable). */
.mls-power-table .tooltip-container .mls-power-tooltip { display: none; width: 220px; font-weight: normal; z-index: 1005; text-align: left; }
.mls-power-table .tooltip-container:hover .mls-power-tooltip,
.mls-power-table .tooltip-container:focus-visible .mls-power-tooltip,
.mls-power-table .tooltip-container .mls-power-tooltip.mobile-visible,
.mls-power-table .tooltip-container .mls-power-tooltip.tt-linger { display: block; }
/* Dismissed with Escape or a second tap/press (see initTooltips in js/shared/ui/tooltips.js). */
.mls-power-table .tooltip-container:hover .mls-power-tooltip.tt-dismissed:not(.mobile-visible),
.mls-power-table .tooltip-container:focus-visible .mls-power-tooltip.tt-dismissed:not(.mobile-visible) { display: none; }
.mls-power-table .tooltip-container .mls-power-tooltip-left { left: -10px; right: auto; }
.mls-power-table .tooltip-container .mls-power-tooltip-right { right: 0; left: auto; }
.mls-power-tooltip-title { font-weight: 700; color: var(--text-main); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.mls-power-tooltip-empty { color: var(--text-muted); font-style: italic; font-size: 0.8rem; }
.mls-power-tooltip-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; font-size: 0.8rem; }
.mls-power-tooltip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; }
.mls-power-tooltip-slot { display: inline-block; min-width: 3.4em; color: var(--text-muted); font-size: 0.7rem; font-weight: 700; }
.mls-power-tooltip-rank { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.mls-power-balance-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.mls-power-balance { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.78rem; margin: 2px 0 6px; }
.mls-power-balance-item { white-space: nowrap; color: var(--text-muted); }
.mls-power-balance-item strong { color: var(--text-main); }
.mls-power-balance-item strong.mls-power-cell-strong { color: #4ade80; }
.mls-power-balance-item strong.mls-power-cell-weak { color: #fca5a5; }
.mls-power-balance-foot { font-size: 0.7rem; color: var(--text-muted); margin: -2px 0 6px; }
.mls-power-tooltip-more { color: var(--text-muted); font-size: 0.75rem; margin-top: 6px; text-align: center; }
.mls-power-notes { margin: 0.6rem 0 0; padding-left: 1.1rem; font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }
/* An empty state is plain text, not a dashed box inside the card (improvements M17, round 5). */
.mls-power-empty { font-size: 0.85rem; color: var(--text-muted); padding: 1rem 0; text-align: center; }

@media (max-width: 520px) {
    /* Seven-plus columns on a phone: tighter cells and a narrower name column keep the table
       inside the card without a horizontal scroller (which would clip the tooltips). */
    .mls-power-table { font-size: 0.8rem; }
    .mls-power-table th { padding: 8px 1px; font-size: 0.6rem; letter-spacing: 0; }
    .mls-power-table td { padding: 9px 1px; }
    .mls-power-table .mls-power-manager { padding-left: 6px; }
    .mls-power-owner { max-width: 5.5rem; font-size: 0.78rem; }
    /* The "window closing" / "young core" qualifier stays in the Your Team summary; in the
       table it would make the Manager column the widest thing on the row. */
    .mls-power-table .mls-power-label-note { display: none; }
    .mls-power-table .mls-power-label { font-size: 0.55rem; padding: 0 4px; }
    /* On a phone, anchor each tooltip to its ROW rather than its cell, so it opens across the
       full table width just under that row -- never off either edge of the screen. */
    .mls-power-table tbody tr { position: relative; }
    .mls-power-table td .tooltip-container { position: static; }
    .mls-power-table .tooltip-container .mls-power-tooltip,
    .mls-power-table .tooltip-container .mls-power-tooltip-left,
    .mls-power-table .tooltip-container .mls-power-tooltip-right { left: 4px; right: 4px; width: auto; top: calc(100% - 2px); }
}

/* Team direction labels (see assignPowerLabels in js/mls/power/directionLabels.js). Green = win now, blue = close,
   amber = on the fence (redraft Bubble), red = sell / long odds. */
.mls-power-label {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    white-space: nowrap;
}
.mls-power-label-note { font-weight: 600; text-transform: none; letter-spacing: 0; opacity: 0.85; }
.mls-power-label-contender { color: #4ade80; background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.45); }
.mls-power-label-retool { color: #93c5fd; background: rgba(147, 197, 253, 0.1); border-color: rgba(147, 197, 253, 0.45); }
.mls-power-label-bubble { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.45); }
.mls-power-label-rebuild,
.mls-power-label-longshot { color: #fca5a5; background: rgba(252, 165, 165, 0.1); border-color: rgba(252, 165, 165, 0.45); }

/* "Your Team" summary above the table, edged in the label's color. */
.mls-power-summary-card {
    margin-bottom: 0.9rem;
    padding: 0.8rem 0.9rem;
    border-left: 3px solid var(--border); /* the tier's colour, a 3px edge; one shade lighter, no frame (improvements M17) */
    border-radius: 0 6px 6px 0; /* a straight stripe, not a bracket (round 3) */
    background: var(--surface-inset);
}
.mls-power-summary-contender { border-left-color: #4ade80; }
.mls-power-summary-retool { border-left-color: #93c5fd; }
.mls-power-summary-bubble { border-left-color: #fbbf24; }
.mls-power-summary-rebuild,
.mls-power-summary-longshot { border-left-color: #fca5a5; }
.mls-power-summary-head { font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mls-power-summary-head .mls-power-label { margin-top: 0; font-size: 0.7rem; }
.mls-power-summary-facts { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.mls-power-summary-facts strong { color: var(--text-main); }
.mls-power-summary-advice { font-size: 0.82rem; color: var(--text-main); margin-top: 6px; line-height: 1.45; }

/* Active Roster card's Power Rankings snapshot (see renderRosterPowerStrip in js/mls/power/snapshot.js): your
   own ranks only, same tier colors as the table. Seven evenly split cells fit a 360px phone. */
.mls-roster-power {
    margin-bottom: 0.9rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    background: var(--surface-inset); /* one shade lighter, no border (improvements M17) */
}
.mls-roster-power-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 0.55rem; }
.mls-roster-power-title { font-size: 0.8rem; font-weight: 700; color: var(--text-main); }
.mls-roster-power-head .mls-power-label { margin-top: 0; }
.mls-roster-power-of { font-size: 0.72rem; color: var(--text-muted); }
.mls-roster-power-stats { display: grid; gap: 4px; } /* column count set inline: one per stat */
.mls-roster-power-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.35rem 0.1rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
}
.mls-roster-power-stat-name { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.mls-roster-power-stat-rank { font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
.mls-roster-power-link { display: inline-block; margin-top: 0.55rem; font-size: 0.75rem; font-weight: 600; color: #c4b5fd; text-decoration: underline; }
.mls-roster-power-link:hover { color: #ddd6fe; }
@media (max-width: 520px) {
    /* All seven cells stay on one row at 360px: slimmer padding and labels. */
    .mls-roster-power { padding: 0.65rem 0.6rem; }
    .mls-roster-power-stats { gap: 3px; }
    .mls-roster-power-stat-name { font-size: 0.55rem; letter-spacing: 0; }
    .mls-roster-power-stat-rank { font-size: 0.95rem; }
}
/* What a past trade did (improvements S29; js/mls/power/tradeLine.js): under the Power Rankings table, in the strip's kind of box. */
.mls-roster-trade {
    margin: 0.9rem 0 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8rem;
}
.mls-roster-trade-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.mls-roster-trade-title { font-weight: 700; color: var(--text-main); flex: 1 1 auto; min-width: 0; }
.mls-roster-trade-pick { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--text-muted); max-width: 100%; }
.mls-roster-trade-pick select { width: auto; max-width: 220px; min-width: 0; padding-top: 0.3rem; padding-bottom: 0.3rem; font-size: 0.78rem; }
.mls-roster-trade-verdict { margin: 0.4rem 0 0; color: var(--text-main); line-height: 1.4; }
.mls-roster-trade-lines { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0.45rem 0 0; }
.mls-roster-trade-lines > div { display: contents; }
/* The other team's line, muted (round 5): grey label, softer colors, a little smaller. */
.mls-roster-trade-lines .mls-roster-trade-other dt { color: var(--text-muted); font-weight: 500; font-size: 0.74rem; }
.mls-roster-trade-lines .mls-roster-trade-other dd { font-size: 0.74rem; opacity: 0.7; }
.mls-roster-trade-nowrap { white-space: nowrap; }
.mls-roster-trade-lines dt { font-weight: 600; color: var(--text-main); overflow-wrap: anywhere; max-width: 9rem; }
/* Each change its own item, spaced apart, at normal weight (round 4: the bold run was louder than the table). */
.mls-roster-trade-lines dd { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-variant-numeric: tabular-nums; }
.mls-roster-trade-change { white-space: nowrap; font-weight: 500; }
.mls-roster-trade-none { color: var(--text-muted); }
.mls-roster-trade-gets { display: flex; flex-direction: column; gap: 1px; margin-top: 0.5rem; font-size: 0.72rem; color: var(--text-muted); overflow-wrap: anywhere; }
.mls-roster-trade-gets strong { color: var(--text-main); font-weight: 600; }
.mls-roster-trade-note { display: flex; align-items: center; gap: 6px; margin-top: 0.45rem; font-size: 0.7rem; color: var(--text-muted); }

/* Roster tab's position counts (js/mls/render/roster.js, improvements S9): one chip per position above the
   list, colored and lit like the Waiver Wire Assistant's position chips (.pos-filter in css/base.css). Each
   chip stacks the position, the count and a small taxi/IR note. One row, one equal column per chip. */
.mls-roster-poscounts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.4rem; margin-bottom: 0.9rem; }
.mls-roster-poscounts[hidden] { display: none; }
.mls-poscount.pos-filter { padding: 0.35rem 0.15rem; gap: 1px; justify-content: flex-start; }
.mls-poscount-name { font-size: 0.68rem; letter-spacing: 0.03em; }
.mls-poscount-num { font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
.mls-poscount-notes { display: flex; flex-direction: column; align-items: center; }
.mls-poscount-note { font-size: 0.68rem; font-weight: 600; text-align: center; line-height: 1.2; opacity: 0.85; }
/* With one position picked, the others fade less than the Waiver Wire's chips (.pos-filter): their
   counts are still worth reading. */
.mls-poscount.pos-filter:not(.active-filter) { opacity: 0.6; filter: grayscale(35%); }
.mls-poscount.pos-filter:not(.active-filter):hover { opacity: 0.85; filter: grayscale(15%); }
/* A Roster row's IR badge (Sleeper IR slot, round 2) is a button so a tap explains it, like button.sos-badge:
   drop the button's own font and line height so it looks like the TAXI badge beside it. */
button.ir-slot-badge { font-family: inherit; line-height: inherit; cursor: pointer; }
/* None at a position the league starts (a 0): shown, not tappable. */
.mls-poscount.pos-filter:disabled { cursor: default; transform: none; }
@media (max-width: 520px) {
    .mls-roster-poscounts { gap: 3px; }
    .mls-poscount-name { font-size: 0.6rem; letter-spacing: 0; }
    .mls-poscount-num { font-size: 0.95rem; }
    .mls-poscount-note { font-size: 0.6rem; }
}

/* The Dashboard's Add/Sync League and Active League Requirements, folded to one line once a league exists
   (js/mls/leagues/setupFolds.js, improvements U4). With no league the card is open and the toggle is plain text. */
.setup-fold-toggle { display: flex; align-items: center; gap: 0.5rem; min-width: 0; max-width: 100%; color: inherit; font: inherit; text-align: left; cursor: default; }
.setup-fold-toggle .chevron { display: none; flex-shrink: 0; color: var(--text-muted); }
.setup-fold-summary { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; font-weight: 400; color: var(--text-muted); }
.has-fold .setup-fold-toggle { cursor: pointer; }
.has-fold .setup-fold-toggle .chevron { display: block; }
.has-fold.is-folded .setup-fold-summary { display: block; }
/* Requirements: the title on one line and the slots under it, wrapping rather than cut off on a phone. */
#activeReqCard .setup-fold-toggle { flex-wrap: wrap; row-gap: 0.15rem; }
#activeReqCard .setup-fold-summary { flex-basis: 100%; padding-left: calc(14px + 0.5rem); white-space: normal; overflow: visible; }
.has-fold.is-folded > .card-header { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
#setupSyncCard.has-fold.is-folded > .card-header > .tooltip-container { display: none; }

/* "What changed" after replacing a ranking set (js/mls/rankings/changeSummary.js, improvements S3): under the
   rankings card that owns the set. The top lists your players and your lineup as compact
   inline items; everything league-wide is in the Details fold. Up is green, down is red. */
.mls-change-card { border-left: 3px solid var(--primary-green); }
.mls-change-head { gap: 0.75rem; }
.mls-change-head h3 { min-width: 0; overflow-wrap: anywhere; }
.mls-change-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; color: var(--text-muted); cursor: pointer; }
.mls-change-close:hover, .mls-change-close:focus-visible { color: var(--text-main); background: rgba(255, 255, 255, 0.08); }
.mls-change-since { margin: 0 0 0.75rem; font-size: 0.78rem; color: var(--text-muted); }
.mls-change-counts { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.mls-change-note { margin: 0.35rem 0 0; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.mls-change-empty, .mls-change-none { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.mls-change-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 1.25rem; }
.mls-change-group { margin-top: 0.9rem; min-width: 0; }
.mls-change-card > .mls-change-group:first-of-type { margin-top: 0; }
.mls-change-group-title { margin: 0 0 0.3rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.mls-change-count { font-weight: 600; opacity: 0.8; }
.mls-change-list { list-style: none; margin: 0; padding: 0; }
.mls-change-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.45rem; padding: 0.35rem 0; font-size: 0.86rem; }
.mls-change-row + .mls-change-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
/* Compact items: one line that wraps, for the top of the card. */
.mls-change-inline { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.mls-change-item { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.86rem; white-space: nowrap; }
.mls-change-icon { display: inline-flex; flex-shrink: 0; }
.mls-change-row.is-up .mls-change-icon, .mls-change-row.is-up .mls-change-delta, .mls-change-row.is-added .mls-change-icon,
.mls-change-item.is-up .mls-change-icon, .mls-change-item.is-up .mls-change-delta, .mls-change-item.is-added .mls-change-icon { color: var(--primary-green); }
.mls-change-row.is-down .mls-change-icon, .mls-change-row.is-down .mls-change-delta, .mls-change-row.is-dropped .mls-change-icon,
.mls-change-item.is-down .mls-change-icon, .mls-change-item.is-down .mls-change-delta, .mls-change-item.is-dropped .mls-change-icon { color: var(--error-text); }
.mls-change-row.is-pos .mls-change-icon, .mls-change-item.is-pos .mls-change-icon { color: var(--text-muted); }
.mls-change-name { color: var(--text-main); font-weight: 600; min-width: 0; }
.mls-change-ranks { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mls-change-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.mls-change-tier { font-size: 0.72rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.mls-change-leagues { flex-basis: 100%; padding-left: calc(13px + 0.45rem); font-size: 0.72rem; color: var(--text-muted); }
.mls-change-more-note { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--text-muted); }
/* The folds: Details (everything league-wide) and, inside it, Show all moves. */
.mls-change-fold { margin-top: 0.9rem; }
.mls-change-details { padding-top: 0.6rem; border-top: 1px solid var(--border); }
.mls-change-fold > summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--primary-green); list-style: none; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.mls-change-fold > summary::-webkit-details-marker { display: none; }
.mls-change-fold:not([open]) > summary .mls-change-when-open,
.mls-change-fold[open] > summary .mls-change-when-closed { display: none; }
.mls-change-all, .mls-change-yours-all { margin-top: 0.6rem; }
/* The chip beside a player's rank on the Lineup and Roster tabs (js/mls/rankings/moveChips.js). */
.mls-move-chip { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; border: 1px solid transparent; font-family: inherit; font-weight: 700; font-variant-numeric: tabular-nums; line-height: inherit; cursor: pointer; }
.mls-move-chip.is-up { color: var(--primary-green); border-color: rgba(16, 185, 129, 0.45); }
.mls-move-chip.is-down { color: var(--error-text); border-color: rgba(252, 165, 165, 0.45); }
.mls-move-chip.is-new { color: var(--text-main); }

/* The header's league picker: css/base.css, "HEADER PICKER" (shared with Draft Strategist's draft picker since
   improvements M2). */

/* --- The Scoreboard's MVPs & LVPs (week/thisWeek.js, improvements S22): a folded section under the tiles. --- */
.mls-recap { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
/* The Scoreboard's folds (Still in play, MVPs & LVPs; S22 round 3): the chevron turns (the shared .chevron rule,
   css/base.css) while a "cards" view transition moves the box (week/thisWeek.js, toggleWeekFold). */
.mls-week-fold-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; width: 100%; padding: 0.2rem 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.mls-week-fold-toggle .mls-week-sub { margin: 0; }
.mls-week-inplay { margin-top: 0.6rem; }
.mls-week-chevron { flex-shrink: 0; color: var(--text-muted); }
.mls-week-export { margin-top: 1rem; display: flex; justify-content: flex-end; }
.mls-week-export .btn { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0; }
.mls-recap-title { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.mls-recap-subhead { display: flex; align-items: center; gap: 0.4rem; margin: 0.8rem 0 0.4rem; }
.mls-recap-subhead .mls-week-sub { margin: 0; }
/* "MVPs" / "LVPs" as written, not in the subheadings' capitals (round 7: "MVPS" read like a typo). */
.mls-week-sub.mls-recap-sub { text-transform: none; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.mls-recap-league { color: var(--text-muted); }
/* The tables: one grid per table, each row a subgrid, so the columns fit their numbers and line up; the name takes
   what's left and wraps, never cut. A reading width on wide screens, so the numbers stay near the names. */
.mls-recap-table { list-style: none; margin: 0; padding: 0; max-width: 760px; display: grid; column-gap: 0.75rem; font-variant-numeric: tabular-nums; }
/* MVPs and LVPs share one shape since round 8: Player | Own | the verdict's points (or Boomed / Busted) | Pts | Started. */
.mls-recap-table { grid-template-columns: minmax(0, 1fr) repeat(4, auto); }
/* One league (round 10): no Own or Started, so Player | Half PPR | Pts. */
.mls-recap-table.is-single { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }
.mls-recap-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.mls-recap-headrow { padding-top: 0; font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.mls-recap-cell { min-width: 0; white-space: nowrap; color: var(--text-muted); }
.mls-recap-cell.mls-recap-player { white-space: normal; }
.mls-recap-cell:not(.mls-recap-player) { text-align: right; }
.mls-recap-name { color: var(--text-main); font-weight: 600; overflow-wrap: break-word; }
.mls-recap-row.is-partial .mls-recap-name { font-weight: 500; }
.mls-recap-cell-label { display: none; }
.mls-recap-note { margin: 0.4rem 0 0; font-size: 0.78rem; color: var(--text-muted); }
.mls-recap-extra { margin: 0.8rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.8rem; color: var(--text-muted); }
.mls-recap-extra strong { color: var(--text-main); }
.mls-recap-extra-note { font-size: 0.75rem; }
.mls-recap-sublist { margin: 0.2rem 0 0; padding-left: 1.1rem; list-style: circle; display: flex; flex-direction: column; gap: 0.1rem; }
.mls-recap-more { list-style: none; font-style: italic; }
.mls-recap-foot { margin: 0.6rem 0 0; font-size: 0.75rem; }
/* Phones: Started drops to a second line under the name rather than the table scrolling sideways. */
@media (max-width: 599.98px) {
    .mls-recap-table { column-gap: 0.55rem; }
    .mls-recap-table { grid-template-columns: minmax(0, 1fr) repeat(3, auto); }
    .mls-recap-table.is-single { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }
    .mls-recap-table .mls-recap-started { grid-column: 1 / -1; text-align: left; font-size: 0.75rem; }
    .mls-recap-table .mls-recap-headrow .mls-recap-started { display: none; }
    .mls-recap-table .mls-recap-started .mls-recap-cell-label { display: inline; }
}

/* Advanced Settings: MVP / LVP Lines (week/recapLines.js). */
.recap-lines-grid { display: grid; grid-template-columns: 3rem minmax(0, 7rem) minmax(0, 7rem); gap: 0.4rem 0.6rem; align-items: center; margin: 0.6rem 0; }
.recap-lines-head { font-size: 0.75rem; color: var(--text-muted); }
.recap-lines-pos { font-weight: 700; color: var(--text-main); }
.recap-lines-grid .form-input[aria-invalid="true"] { border-color: #ef4444; }
.recap-lines-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.recap-lines-msg { margin-top: 0.5rem; font-size: 0.8rem; color: var(--primary-green); }
.recap-lines-msg:empty { display: none; }
.recap-lines-msg.is-error { color: #fb923c; }

/* The Scoreboard's share image (week/shareImage.js, S22 round 2): drawn only in html2canvas's clone of #thisWeekCard. */
.mls-share-image { width: 480px; max-width: none; margin: 0; padding: 1rem 1.1rem; box-sizing: border-box; border-radius: 8px; background: #1c2541; color: var(--text-main); font-size: 0.85rem; }
.mls-share-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.mls-share-title { font-size: 1rem; font-weight: 700; }
.mls-share-summary { margin-top: 0.3rem; font-size: 0.9rem; font-weight: 600; }
.mls-share-splits { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin-top: 0.5rem; }
.mls-share-split { display: inline-flex; }
/* Each part draws its own border and rounding (round 5): html2canvas dropped the outline of a pill drawn as one bordered
   box with overflow: hidden. */
.mls-share-split-part { padding: 2px 9px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--border); }
.mls-share-split-part:first-child { border-radius: 999px 0 0 999px; }
.mls-share-split-part:last-child { border-radius: 0 999px 999px 0; }
.mls-share-split-part:only-child { border-radius: 999px; }
.mls-share-split-part + .mls-share-split-part { border-left: 0; }
.mls-share-muted { font-weight: 500; color: var(--text-muted); }
.mls-share-section { margin-top: 0.7rem; padding-top: 0.55rem; border-top: 1px solid var(--border); }
/* "MVPs" / "LVPs" as written (round 7: in capitals they read "MVPS" / "LVPS"). */
.mls-share-sub { margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text-muted); }
.mls-share-row { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.15rem 0; }
.mls-share-name { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.mls-share-detail { flex-shrink: 0; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.mls-share-num { flex-shrink: 0; min-width: 4.5rem; text-align: right; white-space: nowrap; }
.mls-share-foot { margin-top: 0.8rem; font-size: 0.7rem; color: var(--text-muted); }

/* Biggest win / worst loss under the record (S22, round 4): two compact rows, side by side on wider screens, each
   opening its league's lineup. The colored edge matches the tiles'. */
.mls-week-extremes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.4rem 0.6rem; margin: 0.5rem 0 0.2rem; max-width: 760px; }
.mls-week-extreme { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; padding: 0.35rem 0.55rem; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.15); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mls-week-extreme:hover { background: rgba(255, 255, 255, 0.04); }
/* A past week's tiles and extremes show results only (S28 round 3): no pointer, no hover. */
.mls-week-tile-btn.is-static, .mls-week-extreme.is-static { cursor: default; }
.mls-week-tile-btn.is-static:hover, .mls-week-extreme.is-static:hover { background: rgba(0, 0, 0, 0.15); }
.mls-week-extreme.is-win { border-left-color: #10b981; }
.mls-week-extreme.is-loss { border-left-color: #ef4444; }
.mls-week-extreme-label { flex-shrink: 0; font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
.mls-week-extreme .mls-week-name { flex: 1 1 auto; min-width: 0; font-size: 0.85rem; }
.mls-week-extreme .mls-week-tile-margin { flex-shrink: 0; font-size: 0.85rem; }
.recap-lines-scale { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.recap-lines-scale label { font-weight: 600; color: var(--text-main); }
.recap-lines-scale .form-input { width: auto; min-width: 9rem; }

/* --- Now and long-term side by side (improvements S24): dynasty and keeper leagues with an In-Season set --- */
/* Roster tab: the gap chip (rankings/nowAndLater.js rankGap), a button that explains itself on tap. */
.mls-gap-chip { display: inline-flex; align-items: center; flex-shrink: 0; border: 1px solid transparent; font-family: inherit; font-weight: 700; line-height: inherit; white-space: nowrap; cursor: pointer; background: transparent; }
.mls-gap-chip.is-now { color: var(--pos-te-border); border-color: rgba(245, 158, 11, 0.5); }
.mls-gap-chip.is-later { color: #93c5fd; border-color: rgba(59, 130, 246, 0.55); }
/* Roster tab: both sets' ranks in one badge (render/roster.js dualRankBadge), split at the bar on a narrow row. */
.mls-player-row-meta:has(.mls-rank-dual) { row-gap: 3px; }
.mls-roster-sort { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.mls-roster-sort .mls-segmented { flex: 0 1 14rem; }
.mls-roster-sort .mls-segmented-btn { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
/* Trade Analyzer: each row's In-Season value under its dynasty one. */
.mls-trade-row-now { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
/* A dynasty or keeper league with no In-Season set: how to get both (Roster tab, Trade Analyzer). */
.mls-roster-season-hint { margin-bottom: 0.6rem; font-size: 0.8rem; color: var(--text-muted); text-align: left; }
/* The Trade Analyzer's notes about In-Season rankings (round 6): a quiet box with its button, like the other notes; amber
   for the 1QB-set warning. */
.mls-trade-season-hint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; margin-bottom: 0.6rem; padding: 0.5rem 0.7rem;
    border: 1px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.15); font-size: 0.8rem; color: var(--text-muted); text-align: left; }
.mls-trade-season-hint.is-warning { border-color: rgba(251, 191, 36, 0.45); color: #fcd34d; }
.mls-trade-market-strip-head { display: inline-flex; align-items: center; gap: 5px; }
.mls-roster-season-hint strong { color: var(--text-main); font-weight: 600; }
/* Round 4 (owner's review): In-Season and Dynasty as two matching tiles, side by side at every width, tinted by their
   verdicts like the banners; Market Consensus as one muted line under them. */
.mls-trade-tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; margin-bottom: 0.6rem; }
.mls-trade-tile { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 0.8rem; text-align: center; min-width: 0; }
.mls-trade-tile-label { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-main); }
.mls-trade-tile-label .tooltip-container { text-transform: none; letter-spacing: normal; font-weight: 400; }
.mls-trade-tile-set { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.mls-trade-tile .mls-trade-tile-result { font-size: 1.2rem; font-weight: 800; margin: 0.4rem 0 0.1rem; line-height: 1.2; }
.mls-trade-tile-diff { font-size: 0.85rem; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }
.mls-trade-tile-totals { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
/* Phones (round 5, owner: "more vertical space, less horizontal"): one tile over the other, each laid out sideways (the label
   and its set on the left, the verdict, points and totals on the right), so the two stay short without being cramped. */
@media (max-width: 839.98px) {
    .mls-trade-tiles { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
    .mls-trade-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "label result" "set diff" ". totals";
        column-gap: 0.75rem; align-items: baseline; text-align: right; padding: 0.6rem 0.8rem; }
    .mls-trade-tile-label { grid-area: label; justify-content: flex-start; }
    .mls-trade-tile-set { grid-area: set; text-align: left; margin-top: 0; }
    .mls-trade-tile .mls-trade-tile-result { grid-area: result; margin: 0; font-size: 1.1rem; text-align: right; }
    .mls-trade-tile-diff { grid-area: diff; }
    .mls-trade-tile-totals { grid-area: totals; margin-top: 0.1rem; }
}
.mls-trade-market-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.15rem 0.6rem; margin-bottom: 0.6rem; padding: 0.4rem 0.6rem; border: 0; border-left: 3px solid var(--border); border-radius: 0 8px 8px 0; background: var(--surface-inset); font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Round 13 (owner: round 4 over-corrected, the line read as a footnote): a slim bar with its verdict's color on the left
   edge and a faint tint, the verdict word larger. Still one line and below your two tiles in weight. */
.mls-trade-market-strip { border-left-width: 3px; }
.mls-trade-market-strip.verdict-fair { border-color: var(--border); border-left-color: var(--dart-border); background: rgba(59, 130, 246, 0.05); }
.mls-trade-market-strip.verdict-favor-you { border-color: var(--border); border-left-color: var(--target-border); background: rgba(16, 185, 129, 0.05); }
.mls-trade-market-strip.verdict-favor-them { border-color: var(--border); border-left-color: var(--avoid-border); background: rgba(239, 68, 68, 0.05); }
.mls-trade-market-strip.verdict-incomplete { border-color: var(--border); background: var(--surface-inset); }
.mls-trade-market-strip-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.7rem; }
.mls-trade-market-strip-result { font-weight: 800; font-size: 0.95rem; }
.mls-trade-market-strip.verdict-favor-you .mls-trade-market-strip-result { color: var(--primary-green); }
.mls-trade-market-strip.verdict-favor-them .mls-trade-market-strip-result { color: #fca5a5; }
.mls-trade-market-strip.verdict-fair .mls-trade-market-strip-result { color: #93c5fd; }
.mls-trade-row-dyn { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); margin-right: 3px; }
/* "To make it fair": Value by: Dynasty | In-Season (S24, round 3). */
.mls-trade-fair-basis { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.78rem; color: var(--text-muted); }
.mls-trade-fair-basis .mls-segmented { flex: 0 1 13rem; }
.mls-trade-fair-basis .mls-segmented-btn { padding: 0.25rem 0.5rem; font-size: 0.78rem; }
/* "More analysis" (S24, round 16): a quiet divider between the two sides and the extras under them (To make it fair,
   Power Rankings after the trade), with the Value by switch on the same line where it fits. */
.mls-trade-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.75rem; margin: 1.25rem 0 0.75rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.mls-trade-more-title { margin: 0; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.mls-trade-more .mls-trade-fair-basis { margin-bottom: 0; }
.mls-trade-more-caption { flex-basis: 100%; text-align: right; font-size: 0.75rem; color: var(--text-muted); }
.mls-trade-more .mls-trade-fair-basis > span { white-space: nowrap; }
/* Phones: the title, then the switch, then the caption, each on its own line and left-aligned (side by side, "Value by"
   wrapped beside a squeezed switch). */
@media (max-width: 520px) {
    .mls-trade-more { flex-direction: column; align-items: flex-start; }
    .mls-trade-more .mls-trade-fair-basis { align-self: stretch; }
    .mls-trade-more-caption { text-align: left; }
}
/* Roster tab, both sets (round 3): on phones the two-set badge starts a line of its own under team, chips and SoS. */
.mls-meta-break { display: none; }
@media (max-width: 599.98px) { .mls-meta-break { display: block; flex-basis: 100%; height: 0; } }
/* Power Rankings after the trade in a league with both sets (S24, round 4): the summary as short labeled lines. */
.mls-trade-impact-lines { margin: 0.5rem 0 0.6rem; display: grid; gap: 2px; font-size: 0.85rem; }
.mls-trade-impact-lines > div { display: flex; gap: 0.6rem; }
.mls-trade-impact-lines dt { flex: 0 0 3.6rem; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding-top: 2px; }
.mls-trade-impact-lines dd { margin: 0; color: var(--text-main); font-weight: 600; }
/* The two-set badge's tooltip (S24, round 4): the row's info box clips (overflow: hidden), which hid the tooltip, so rows
   with that badge don't clip. Always, not only while it's open: switching overflow on hover reflowed the row under the
   pointer, which ended the hover and flickered. min-width: 0 keeps the row's width as it was. */
/* The same for a row with a "Drop 1" badge (S54): the clip cut off the top of its 48px tap area (touch-targets.spec). */
.mls-player-row-info:has(.mls-rank-dual-tip, .mls-drop-badge) { overflow: visible; min-width: 0; }
/* The notes under the Now / Long-term tiles, in one quiet box (S24, round 8). */
.mls-trade-tile-notes { margin-bottom: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--surface-inset); }
.mls-trade-tile-notes .trade-verdict-note { margin: 0; font-size: 0.8rem; text-align: left; }
.mls-trade-tile-notes .trade-verdict-note + .trade-verdict-note { margin-top: 0.3rem; }
/* Which card a note is about (round 17): the card's totals and the note's start carry the same mark (*, †, ‡). */
.mls-note-mark { font-weight: 800; color: var(--text-main); }
[data-card-mark] { margin-left: 2px; }
/* Power Rankings: the 1QB-rankings note in a superflex league (S24, round 8), amber like the Trade Analyzer's. */
.mls-power-source-key.is-warning { color: #fcd34d; }
/* The 1QB-rankings note with its switch (S24, rounds 8 and 9): Trade Analyzer and Power Rankings. Amber while QBs read
   low (off) or wait for superflex market values; quiet once the market prices them. */
.mls-qb-market-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin: 0 0 0.6rem; padding: 0.5rem 0.7rem;
    border: 1px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.15); font-size: 0.8rem; color: var(--text-muted); text-align: left; }
.mls-qb-market-note.is-warning { border-color: rgba(251, 191, 36, 0.45); color: #fcd34d; }
.mls-qb-market-toggle { display: flex; align-items: center; gap: 0.5rem; flex-basis: 100%; color: var(--text-main); font-weight: 600; cursor: pointer; }
/* The Roster tab's two-set badge tooltip (S24, round 12): sized to its lines up to 360px instead of the site's fixed 260px,
   which wrapped "In-Season: QB3 (T11), #57 overall (T11)" with room to spare on a computer. The window cap still applies. */
.mls-rank-dual-tip .tooltip-text.mls-rank-dual-text { width: max-content; max-width: min(360px, calc(100vw - 16px)); }
.mls-rank-dual-priced { display: inline-block; margin-top: 4px; color: var(--text-muted); }
.mls-roster-sort-note { margin: -0.3rem 0 0.6rem; font-size: 0.78rem; color: var(--text-muted); }

/* --- RANKINGS CARD, improvements F10 round 2 --- */
/* "+ Create New Set" picked: which set the league keeps until the next upload saves the new one. */
.mls-new-set-hint { margin: 0.35rem 0 0; font-size: 0.78rem; line-height: 1.4; color: var(--text-muted); }
/* On phones Rename is its pencil alone (its title and aria-label keep the name), so the set's name has room in the
   drop-down beside it ("ROS Redraft (24 pla…" was cut off). */
@media (max-width: 480px) {
    .mls-rename-label { display: none; }
}
/* Auto-Fetch's settings, folded behind a one-line summary of what they are. */
.mls-autofetch-settings > summary {
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.25rem 0 0.6rem;
    width: fit-content;
    max-width: 100%;
}
.mls-autofetch-settings-label { font-weight: 600; color: var(--text-main); }
#marketSourceSettings .mls-autofetch-settings-label { white-space: nowrap; } /* "Market source" stays on one line (S38) */
.mls-autofetch-settings[open] > summary { padding-bottom: 0.75rem; }

/* --- The Scoreboard's two halves and Who to root for (week/thisWeek.js, improvements S27) --- */
/* League Scoreboard and Player Scoreboard: folding sections under the header, each with a bolder title. */
.mls-week-section { margin-top: 0.6rem; }
.mls-week-section + .mls-week-section { border-top: 1px solid var(--border); padding-top: 0.6rem; margin-top: 1rem; }
.mls-week-section > .mls-week-fold-toggle { padding: 0.3rem 0; }
.mls-week-section-title { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.mls-week-section > .mls-week-fold-body { padding-top: 0.2rem; }
.mls-week-section > .mls-week-fold-body > :first-child { margin-top: 0.2rem; }
.mls-root { margin-top: 0.3rem; }
.mls-root-intro { margin: 0.1rem 0 0.5rem; font-size: 0.78rem; color: var(--text-muted); max-width: 70ch; }
.mls-root-empty, .mls-root-pending, .mls-root-note { margin: 0.3rem 0; }
.mls-root-none { margin: 0.1rem 0.25rem; font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
/* The three groups: stacked on phones, side by side from 900px. A colored top edge per side. */
.mls-root-spot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
/* Each group its own height (round 7: an empty one stretched to its neighbours'). */
@media (min-width: 900px) { .mls-root-spot { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.mls-root-group { --root-c: #10b981; min-width: 0; border: 1px solid var(--border); border-top: 3px solid var(--root-c); border-radius: 10px; padding: 0.5rem 0.55rem; background: rgba(255, 255, 255, 0.02); }
.mls-root-group.is-against { --root-c: #ef4444; }
.mls-root-group.is-both { --root-c: #f59e0b; }
.mls-root-group-title { display: flex; align-items: center; gap: 0.35rem; margin: 0 0 0.3rem; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--root-c); }
.mls-root-group-n { font-weight: 500; letter-spacing: 0; color: var(--text-muted); }
.mls-root-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.mls-root-player { display: grid; grid-template-columns: 32px auto minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; width: 100%; min-height: 44px; padding: 0.3rem 0.35rem; border-radius: 8px; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.mls-root-player:hover { background: rgba(255, 255, 255, 0.04); }
body.mls-hide-headshots .mls-root-player { grid-template-columns: auto minmax(0, 1fr) auto; }
.mls-root-pos { width: 34px; padding: 1px 0; text-align: center; font-size: 0.62rem; }
.mls-root-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mls-root-name { color: var(--text-main); font-weight: 600; font-size: 0.85rem; overflow-wrap: anywhere; }
.mls-root-meta { font-size: 0.72rem; color: var(--text-muted); }
.mls-root-live { color: #f59e0b; font-weight: 600; }
.mls-root-in { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.mls-root-pts { text-align: right; font-weight: 700; font-size: 0.85rem; color: var(--text-main); font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.mls-root-pts small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--text-muted); }
/* "in 3": how many of your matchups, in the side's color. */
.badge.mls-root-count { white-space: nowrap; margin-left: 0.3rem; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; font-size: 0.66rem; font-weight: 700; vertical-align: 1px; background: transparent; }
.mls-root-count.is-root { color: #10b981; }
.mls-root-count.is-against { color: #ef4444; }
.mls-root-count.is-both { color: #f59e0b; }
.mls-root-group-title .mls-root-info { margin-left: auto; text-transform: none; letter-spacing: normal; font-weight: 400; }
.mls-root-stake { margin: 0 0 0.3rem; }
.mls-root-stake .mls-root-share { color: var(--text-main); font-weight: 600; }
.mls-root-stake-note { display: block; margin-top: 2px; }
/* His stake (in the detail): the green part of the bar is the share of his weight in your leagues. */
.badge.mls-root-share { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 2px; padding: 0; font-size: 0.7rem; font-weight: 500; color: var(--text-muted); background: transparent; border: 0; }
.mls-root-share-bar { display: inline-block; width: 54px; height: 5px; border-radius: 3px; background: #ef4444; overflow: hidden; }
.mls-root-share-bar > span { display: block; height: 100%; background: #10b981; }
/* A row's leagues, opened by tapping it. */
.mls-root-detail { margin: 0.1rem 0 0.35rem 2.6rem; padding-left: 0.5rem; border-left: 2px solid var(--border); font-size: 0.75rem; color: var(--text-muted); }
.mls-root-detail ul { list-style: none; margin: 0 0 0.25rem; padding: 0; }
.mls-root-detail-label { display: block; font-weight: 600; }
.mls-root-detail-label.is-root { color: #10b981; }
.mls-root-detail-label.is-against { color: #ef4444; }
.mls-root-detail .mls-week-name { font-weight: 600; }
/* Kickoff windows: a heading that folds, then your starters and theirs (stacked on phones, side by side from 600px). */
.mls-root-window { margin-top: 0.6rem; }
.mls-root-window-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.45rem; width: 100%; min-height: 36px; padding: 0.2rem 0; border-bottom: 1px solid var(--border); text-align: left; color: var(--text-muted); font: inherit; font-size: 0.75rem; cursor: pointer; }
.mls-root-window:not(.is-open) .mls-root-window-head { border-bottom-style: dashed; }
.mls-root-window-title { font-weight: 700; font-size: 0.8rem; color: var(--text-main); }
.mls-root-window-body { padding-top: 0.35rem; }
.mls-root-sides { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
@media (min-width: 600px) { .mls-root-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; } }
.mls-root-side { min-width: 0; }
.mls-root-side-title { margin: 0 0 0.15rem; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.mls-root-side-n { font-weight: 400; }
.mls-root-row.is-compact .mls-root-player { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 40px; padding: 0.2rem 0.3rem; }
.mls-root-row.is-compact .mls-headshot { display: none; }
.mls-root-row.is-compact .mls-root-detail { margin-left: 2.4rem; }
@media (min-width: 600px) {
    .mls-root-row.is-compact .mls-root-player { grid-template-columns: 28px auto minmax(0, 1fr) auto; }
    .mls-root-row.is-compact .mls-headshot { display: inline-flex; width: 28px; height: 28px; }
    body.mls-hide-headshots .mls-root-row.is-compact .mls-headshot { display: none; }
    body.mls-hide-headshots .mls-root-row.is-compact .mls-root-player { grid-template-columns: auto minmax(0, 1fr) auto; }
}
/* The credit line under the Scoreboard card, like the Dashboard's version line. */
.mls-scoreboard-credit a { color: inherit; }
/* The legend's sample of the three sides' icons (js/mls/legend.js). */
.mls-root-legend-icons { display: inline-flex; gap: 0.3rem; margin-right: 0.3rem; vertical-align: -2px; }
.mls-root-legend-icons svg:nth-child(1) { color: #10b981; }
.mls-root-legend-icons svg:nth-child(2) { color: #ef4444; }
.mls-root-legend-icons svg:nth-child(3) { color: #f59e0b; }
/* A league in a row's detail that no longer counts: its matchup is decided or over (round 5). */
.mls-root-detail li.mls-root-part-off { opacity: 0.6; }
/* A player whose every matchup is decided or over (round 6): listed, dimmed, last. */
.mls-root-row.is-settled .mls-root-player { opacity: 0.55; }
/* S33: kickoff dividers inside a box, its "N finished" line, and the find field with its result. */
.mls-root-kick { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0.25rem 0.05rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
.mls-root-kick:first-child { margin-top: 0; }
.mls-root-kick::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.mls-root-finished { margin-top: 0.35rem; border-top: 1px dashed var(--border); }
.mls-root-fin-toggle { display: flex; align-items: center; gap: 0.3rem; width: 100%; min-height: 36px; padding: 0.2rem 0.25rem; text-align: left; font: inherit; font-size: 0.75rem; color: var(--text-muted); cursor: pointer; }
.mls-root-fin-body .mls-root-player { opacity: 0.55; }
.mls-root-find { margin: 0.2rem 0 0.6rem; max-width: 420px; }
.mls-root-find-field { position: relative; }
.mls-root-find-input { width: 100%; padding-left: 2.2rem; padding-right: 2.6rem; }
.mls-root-find-icon { position: absolute; left: 0.75rem; top: calc(50% - 8px); color: var(--text-muted); pointer-events: none; z-index: 1; }
.mls-root-find-clear { position: absolute; right: 0.35rem; top: calc(50% - 16px); width: 32px; height: 32px; border-radius: 50%; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; z-index: 1; }
.mls-root-find-clear[hidden] { display: none; }
.mls-root-find-none { margin-top: 0.35rem; }
/* A suggestion's position, team and standing go under the name: beside it, a long name wrapped on a phone. */
.mls-root-find .autocomplete-item { flex-direction: column; align-items: flex-start; gap: 1px; }
.mls-root-find .autocomplete-meta { margin-left: 0; white-space: normal; }
.mls-root-found { --root-c: #10b981; max-width: 640px; margin: 0 0 0.7rem; padding: 0.5rem 0.55rem; border: 1px solid var(--border); border-left: 3px solid var(--root-c); border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.mls-root-found.is-against { --root-c: #ef4444; }
.mls-root-found.is-both { --root-c: #f59e0b; }
/* Round 3: from 900px the result is as wide as the three boxes, his row over the first box's column and the leagues on
   each side in two columns beside it (at 640px it left the rest of the row empty). */
@media (min-width: 900px) {
    .mls-root-found { max-width: none; }
    .mls-root-found .mls-root-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 0.6rem; align-items: start; }
    .mls-root-found .mls-root-detail:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.8rem; margin: 0.3rem 0 0.2rem; }
    .mls-root-found .mls-root-stake { grid-column: 1 / -1; }
    /* Only one side (a player who's only yours, or only theirs): its leagues take the whole width. */
    .mls-root-found .mls-root-detail-side:only-child { grid-column: 1 / -1; }
}
.mls-root-settled { font-style: italic; }

/* --- A SAVED RANKING SET, READ-ONLY (improvements S30) ---
   js/mls/rankings/setView.js, in the shared sheet (css/base.css, "THE SHEET"): full height on phones (opened
   expanded), and from 840px a panel from the right wide enough for the table (the badge legend's sheet stays 400px).
   The links: "View" beside "Choose leagues…" under each set's drop-down. */
.mls-set-leagues-row [hidden] { display: none; }
/* "View players" on a line of its own at the right, under "Used in … · Choose leagues…" (round 4: the three side by side
   wrapped "Choose leagues…" onto two lines on a phone), or alone when there's one league. */
.mls-set-leagues-row { flex-wrap: wrap; row-gap: 0.15rem; }
.mls-set-leagues-break { flex-basis: 100%; height: 0; }
.mls-set-leagues-row .mls-view-set-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
@media (min-width: 840px) {
    .sheet.rset-view { width: min(640px, calc(100vw - 56px)); }
}
.rset-meta { margin: 0 0 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.rset-picker { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.rset-picker select { flex: 1; min-width: 0; }
.rset-note { margin: 0 0 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.preview-unmatched.rset-unmatched { margin: 0 0 0.75rem; }
/* The search and the first chip row stay in sight while the list scrolls under them; the ownership row scrolls away,
   unless one of its filters is on (.is-pinned, round 2), when it sticks just under them (--rset-controls-h, set from
   setView.js). */
.rset-controls { position: sticky; top: 0; z-index: 2; background: var(--card-bg); padding: 0.25rem 0.25rem 0.4rem; margin: 0 -0.25rem; }
.rset-search { width: 100%; margin-bottom: 0.5rem; }
/* The Roster tab's position counts (.mls-poscount): one row, one equal column per chip, a little shorter here. */
.rset-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.35rem; }
.rset-chips .mls-poscount.pos-filter { padding: 0.2rem 0.1rem; }
.rset-chips .mls-poscount-name { font-size: 0.62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rset-chips .mls-poscount-num { font-size: 0.92rem; }
.rset-owner-chips { margin: 0.1rem 0 0.2rem; background: var(--card-bg); }
.rset-owner-chips[hidden] { display: none; }
.rset-owner-chips.is-pinned { position: sticky; top: var(--rset-controls-h, 0); z-index: 1; margin-inline: -0.25rem; padding: 0.1rem 0.25rem 0.4rem; }
.rset-count { margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--text-muted); }
.rset-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.rset-table thead th { text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); padding: 0.35rem 0.3rem; border-bottom: 1px solid var(--border); }
.rset-table thead abbr { text-decoration: none; }
.rset-table td, .rset-table tbody th { padding: 0.4rem 0.3rem; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; font-weight: 400; }
.rset-table tr[hidden] { display: none; }
.rset-table .rset-rank { width: 2.7rem; color: var(--text-muted); text-align: center; padding-left: 0; padding-right: 0.3rem; }
.rset-table tbody .rset-rank { padding-top: 0.5rem; }
.rset-table .rset-player { min-width: 0; overflow-wrap: anywhere; }
.rset-name { font-weight: 600; margin-right: 0.3rem; }
.rset-table .rset-player .badge { font-size: 0.65rem; padding: 1px 4px; vertical-align: 1px; }
/* No Sleeper match and Fix name on their own line under the name. */
.rset-marks { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
/* Who has him (round 5, owner's choice): your players' rank in a blue chip (the app's blue for yours, .status-mine);
   another team's name only under the Other teams chip (.rset-show-owners on the sheet), on a grey line of its own
   under every row's name, and read to screen readers only until then. */
.rset-rank-chip.is-mine { display: inline-block; min-width: 1.6rem; padding: 0 0.3rem; border-radius: 999px; text-align: center; background: var(--dart-bg); color: #93c5fd; border: 1px solid var(--dart-border); font-weight: 700; }
.rset-owner-name { display: block; margin-top: 0.15rem; font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }
.rset-view:not(.rset-show-owners) .rset-owner-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rset-table .scout-status { font-size: 0.65rem; padding: 0.1rem 0.45rem; letter-spacing: 0.2px; }
.rset-table .rset-pos, .rset-table .rset-sos { white-space: nowrap; width: 1%; }
.rset-table.no-sos .rset-sos, .rset-table.no-pos .rset-pos { display: none; }
/* Where each tier starts (round 2), drawn like Draft Strategist's Tracker lines (.tier-divider in css/mds.css). */
.rset-table .rset-tier-row td { padding: 0.55rem 0 0.15rem; border-bottom: 0; }
.rset-view .tier-divider, .badge-legend-sample .tier-divider { display: flex; align-items: center; gap: 0.75rem; color: var(--primary-green); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; }
.rset-view .tier-divider::before, .rset-view .tier-divider::after,
.badge-legend-sample .tier-divider::before, .badge-legend-sample .tier-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--primary-green), transparent); opacity: 0.45; }
/* Fix name (round 2): the row's name as a field, a line saying whether it matches Sleeper, Save and Cancel. */
.rset-fix-btn { font-size: 0.75rem; padding: 0; }
.rset-edit-input { width: 100%; }
.rset-edit-hint { margin: 0.3rem 0; font-size: 0.75rem; color: var(--text-muted); }
.rset-edit-hint.is-ok { color: var(--primary-green); }
.rset-edit-hint.is-error { color: #fca5a5; }
.rset-edit-actions { display: flex; gap: 0.5rem; }
.rset-unmatched-line { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.rset-unmatched-line .preview-unmatched-title { margin: 0; }
.rset-show-unmatched { padding: 0; flex: none; }
.rset-unmatched .preview-unmatched-hint[hidden] { display: none; }
.preview-unmatched.rset-unmatched { padding: 0.45rem 0.8rem; }
.rset-none { color: var(--text-muted); }
.badge.rset-nomatch-badge { background: rgba(252, 165, 165, 0.08); color: #fca5a5; border: 1px solid var(--avoid-border); }
.rset-empty { padding: 1.25rem 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.rset-empty p { margin: 0 0 0.4rem; }

/* --- NOTIFICATIONS (improvements N2): an Advanced Settings fold holding Starter Alerts. The fold is the box (N2 round 5;
   round 4 had its own .toggle-group box); the switch row sits flush, its options under a divider while on. --- */
/* Settings page groups (S45): open sections under a plain heading, in place of folds. Their switch rows sit flush in the
   group (no second box), so every switch on the page ends at the same right edge as Show Player Headshots'. */
.settings-group-title { margin: 0 0 0.75rem; font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.settings-group .toggle-row { padding: 0; background: none; border: 0; border-radius: 0; margin-bottom: 0; }
.settings-group .toggle-row + .toggle-row { margin-top: 1rem; }
/* The per-league lists in Settings (Paid Leagues, Competing or Rebuilding; S53): flush rows, so they end at the same edge too. */
.paid-settings .toggle-row, .competing-settings .toggle-row { padding: 0; background: none; border: 0; border-radius: 0; margin-bottom: 0; }
.paid-settings .toggle-row + .toggle-row, .competing-settings .toggle-row + .toggle-row { margin-top: 1rem; }
.settings-group > .accordion-body { padding-top: 0; }
/* A fold's one-line summary under its title (MVP / LVP Lines, Danger Zone). */
.sos-summary-text { display: inline-flex; flex-direction: column; gap: 0.15rem; }
.sos-summary-tag { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); }
/* FAAB Bids without a FAAB league: there to be seen, not used. */
.faab-unavailable-note { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.faab-unavailable-note[hidden] { display: none; }
.faab-settings.is-unavailable .accordion-body { opacity: 0.55; pointer-events: none; }
/* Suggested FAAB bids' style choice (improvements S35, round 6), under its switch. */
.faab-style-options { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.faab-style-options[hidden] { display: none; }
.faab-style-label { font-size: 0.8rem; font-weight: 600; color: var(--text-main); margin-top: 0.25rem; }
.faab-bids-status { margin: 0; }
.faab-style-options .mls-segmented { justify-self: start; }
.starter-alerts > .toggle-row { margin: 0; padding: 0; border: 0; background: none; }
.starter-alerts-bell { color: var(--primary-green); } /* stroke="currentColor": green like the Headshots icon */
.starter-alerts-options {
    display: grid;
    gap: var(--space-2);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.starter-alerts-options[hidden] { display: none; }
.starter-alerts-next { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--primary-green); }
.starter-alerts-next[hidden] { display: none; }
.starter-alerts-lead {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.starter-alerts-lead select { width: auto; min-width: 0; flex: 0 1 auto; }
.starter-alerts-options .toggle-row-flush { margin: 0.25rem 0 0; }
.starter-alerts-status { margin: 0; color: #f59e0b; } /* the stale-label amber (.freshness-stale) */
.starter-alerts-test { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-top: 0.25rem; }
.starter-alerts-test .btn { width: auto; flex: none; }
.starter-alerts-test .text-helper:empty { display: none; }

/* --- The Final Window (improvements S36, week/thisWeek.js finalHTML): the Scoreboard's section when only the last night
   window is left. Tiles two across on phones, four from 900px; matchups one column, two from 900px. --- */
.mls-fw .mls-week-section-title { display: inline-flex; align-items: center; gap: 0.4rem; }
.mls-fw-icon { flex: none; color: #a78bfa; }
.mls-fw-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.4rem 0 0.2rem; }
.mls-fw-tile { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.mls-fw-tile-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mls-fw-tile-value { font-size: 1.3rem; line-height: 1.2; color: var(--text-main); font-variant-numeric: tabular-nums; }
.mls-fw-tile-sub { font-size: 0.75rem; color: var(--text-muted); }
.mls-fw-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; align-items: start; } /* each card its own height (round 9) */
.mls-fw-match { min-width: 0; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-left: 3px solid #f59e0b; border-radius: 8px; }
.mls-fw-match.is-ahead { border-left-color: var(--primary-green); }
.mls-fw-match.is-behind { border-left-color: #ef4444; }
.mls-fw-match-open { display: block; width: 100%; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; border-radius: 4px; }
.mls-fw-match-open:hover { background: rgba(255, 255, 255, 0.04); }
.mls-fw-match-head { display: flex; align-items: baseline; gap: 0.5rem; }
.mls-fw-match-head .mls-week-tile-go { flex: none; align-self: center; color: var(--text-muted); }
.mls-fw-match-open:hover .mls-week-tile-go { color: var(--text-main); }
.mls-fw-score { display: block; }
.mls-fw-match-head .mls-week-line-name { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.mls-fw-score { font-size: 0.85rem; color: var(--text-main); font-variant-numeric: tabular-nums; }
.mls-fw-bar { display: flex; align-items: center; gap: 0.5rem; margin: 0.3rem 0; font-size: 0.78rem; }
.mls-fw-bar .mls-week-chance { margin-left: 0; }
.mls-fw-bar-track { flex: 1 1 auto; height: 6px; border-radius: 3px; background: #ef4444; overflow: hidden; }
.mls-fw-bar-track > span { display: block; height: 100%; background: var(--primary-green); }
.mls-fw-need { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--text-main); }
.mls-fw-need .mls-root-pos { vertical-align: 1px; }
.mls-fw-sub-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem; }
.mls-fw-sub-row .mls-week-sub { flex: none; white-space: nowrap; }
.mls-fw-sub-row .mls-week-sub { margin-bottom: 0.4rem; }
.mls-fw-asof { margin: 0 0 0.4rem auto; display: inline-flex; align-items: baseline; gap: 0.4rem; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.mls-fw-top { display: grid; gap: 0.5rem; margin: 0.4rem 0 0.2rem; }
.mls-fw-top > .mls-fw-tiles { margin: 0; }
.mls-fw-bars { margin: 0; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.mls-fw-bars-head { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mls-fw-bars-head span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.mls-fw-bars-cols { display: grid; gap: 4px; height: 110px; margin-top: 0.4rem; }
.mls-fw-bars-col { min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.mls-fw-bars-bar { display: block; width: 100%; max-width: 34px; background: var(--btn-blue-bg); border-radius: 3px 3px 0 0; }
.mls-fw-bars-pct { font-size: 0.68rem; color: var(--text-main); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mls-fw-bars-w { font-size: 0.72rem; color: var(--text-muted); }
.mls-fw-bars-axis { text-align: center; font-size: 0.68rem; color: var(--text-muted); }
.mls-fw-oneline { margin: 0.4rem 0; font-size: 0.85rem; color: var(--text-main); }
.mls-fw-whatif-toggle { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.3rem; padding: 0.1rem 0; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.mls-fw-whatif-toggle:hover { color: var(--text-main); }
.mls-fw-table { width: 100%; margin-top: 0.2rem; border-collapse: collapse; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.mls-fw-table th, .mls-fw-table td { padding: 0.2rem 0.3rem; border-top: 1px solid var(--border); text-align: left; font-weight: 400; }
.mls-fw-table th { color: var(--text-muted); }
.mls-fw-note { margin: 0.5rem 0 0; font-size: 0.75rem; }
@media (min-width: 900px) {
    .mls-fw-top { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
    .mls-fw-tiles { grid-template-columns: minmax(0, 1fr); }
    .mls-fw-top.is-waiting { grid-template-columns: minmax(0, 1fr); }
    .mls-fw-top.is-waiting .mls-fw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mls-fw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mls-fw-legend { display: inline-block; width: 150px; margin-right: 0.75rem; }
.mls-fw-legend .mls-fw-bar { margin: 0; }

/* --- LIST ROWS REACH INTO THEIR CARD'S PADDING (improvements M17, round 5) ---
   A flat row (css/base.css) reaches 12px into its card's padding on each side and pads its content back by the same 12px,
   so the content stays where it was (343px on a 375px phone) while the row's own box is wider. That gives a coloured
   3px edge (locked, swapping, the active league, a waiver Start) room outside the content, so an edged row's badge and
   name line up with the rows around it, and the hover tone (Material 3's 8% state layer) doesn't start right at the
   content. Lineup Strategist only: Draft Strategist's one .roster-item list sets its own padding inline. */
.lineup-slot, .roster-item, .scout-result-card, .mls-lc-card {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
}
@media (hover: hover) {
    .lineup-slot:hover, .roster-item:hover, .scout-result-card:hover { background-color: rgba(255, 255, 255, 0.08); }
}
/* The divider stays at the content's width, in line with the card header's rule above the list, rather than reaching
   into the padding with the row: a line drawn 12px in from each side of the row. */
.lineup-slot + .lineup-slot, .roster-item + .roster-item, .scout-result-card + .scout-result-card, .mls-lc-card + .mls-lc-card {
    border-top: 0;
    position: relative;
}
:is(.lineup-slot + .lineup-slot, .roster-item + .roster-item, .scout-result-card + .scout-result-card, .mls-lc-card + .mls-lc-card)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    border-top: 1px solid var(--divider);
    pointer-events: none;
}
.lineup-slot.taxi-row + .lineup-slot.taxi-row::before { border-top-style: dashed; }

/* --- PHONE ROWS (improvements S32, the owner's choices) ---
   Lineup and Roster rows under 600px: the slot (or position) badge sits on the bottom edge of a 36px photo, so the name
   gets the row's width; a Lineup row shows only what you need at a glance and keeps the rest a tap away. Tablets and
   computers keep today's rows: the lead wrapper is `display: contents` there and the phone-only controls are hidden,
   so they lay out exactly as before (and Export Lineup, drawn at a computer's width since M17, is unchanged).
   On a phone a Lineup row shows the slot, photo, name and bye week, position, team, rank badge, the kickoff with its
   opponent, the warnings that need you (injury, BYE, the IR slot, Bench / Starting in Sleeper, and EARLY since round 3),
   points and swap. LOCKED / AUTO-LOCKED, TAXI and the rank-change chip wait behind the "+N" after the name, which opens the row's details
   in the shared sheet (js/mls/render/lineupDetails.js). The photo and slot badge are the lock button (the padlock dot
   says which state), so swap and lock each have a 48px target with room between them. */
.mls-row-lead, .mls-row-name-line { display: contents; }
.mls-lead-lock, .mls-row-more { display: none; }
/* The padlock dot: on the photo on phones, and in the badge legend at any width. */
.mls-lock-dot { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border); color: var(--text-muted); vertical-align: middle; }
.mls-lock-dot.is-off svg { opacity: 0.75; }
.mls-lock-dot.is-on { background: var(--primary-green); border-color: var(--primary-green); color: #04120b; }
.mls-lock-dot.is-auto { background: #60a5fa; border-color: #60a5fa; color: #06101f; }
/* The "+N" chip (and its look in the legend). */
.mls-row-more { align-items: center; justify-content: center; min-width: 24px; height: 18px; box-sizing: border-box; padding: 0 6px; border-radius: 9px; border: 1px solid var(--border); background: none; color: var(--text-muted); font: 700 0.65rem/1 inherit; vertical-align: 2px; }
.badge-legend-sample .mls-row-more { display: inline-flex; }
/* With nothing hidden, just three quiet dots. */
.mls-row-more.is-dots { border-color: transparent; padding: 0 2px; min-width: 0; opacity: 0.8; }

@media (max-width: 480px) {
    .lineup-slot .mls-player-row-text .mls-row-name-line { font-size: 0.85rem; } /* .player-name-wrap's phone size */
}
@media (max-width: 599.98px) {
    .lineup-slot .mls-row-lead, .roster-item .mls-row-lead {
        display: flex;
        position: relative;
        flex: none;
        width: 42px;
        height: 44px;
        justify-content: center;
        align-items: flex-start;
    }
    .mls-row-lead .mls-headshot { width: 36px; height: 36px; }
    .lineup-slot .mls-row-lead .slot-badge, .roster-item .mls-row-lead .pos-badge {
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        z-index: 1;
        width: auto;
        min-width: 30px;
        margin: 0;
        padding: 0 3px;
        font-size: 0.58rem;
        line-height: 1.35;
        text-align: center;
        box-shadow: 0 0 0 2px var(--card-bg);
    }
    /* Without a photo or a lock above it, the badge stands alone in the column's middle, at the same size: with headshots
       turned off (Lineup settings) on the Roster tab and bench rows, and an empty slot (round 4: it was the old wide pill).
       A starter with headshots off keeps the badge at the bottom and the padlock above it, where the photo would be (round
       4: the padlock sat on the badge). */
    .lineup-slot.empty .mls-row-lead,
    body.mls-hide-headshots :is(.lineup-slot, .roster-item) .mls-row-lead:not(:has(.mls-lead-lock)) { height: auto; align-items: center; }
    .lineup-slot.empty .mls-row-lead .slot-badge,
    body.mls-hide-headshots :is(.lineup-slot, .roster-item) .mls-row-lead:not(:has(.mls-lead-lock)) :is(.slot-badge, .pos-badge) { position: static; transform: none; box-shadow: none; }
    /* The bench's BN under the photo: a solid outline and lighter text (round 6: grey on grey was hard to read). TX and IR
       keep their dashed "can't start" outline. */
    .mls-row-lead .slot-badge.slot-BN { background: var(--card-bg); border: 1px solid #64748b; color: #cbd5e1; }
    body.mls-hide-headshots .mls-lead-lock .mls-lock-dot { top: 2px; left: 50%; right: auto; transform: translateX(-50%); }

    /* The photo and slot badge are the lock button: a 42x44px box, 48px with the hit area (css/base.css). */
    .lineup-slot .mls-lead-lock {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 2;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: none;
        color: inherit;
        cursor: pointer;
    }
    .mls-lead-lock .mls-lock-dot { position: absolute; top: -3px; right: -1px; }

    /* What waits behind the tap. */
    .lineup-slot :is(.mls-lock-badge, .mls-autolock-badge, .taxi-badge, .mls-move-chip),
    .lineup-slot .mls-row-lock,
    .lineup-slot .mls-player-badges-row.is-phone-empty { display: none; }

    /* The name and badge column is the details button's target: its "+N" stays small, and its area covers the column.
       The badges in it that explain themselves on a tap (the IR slot, the opponent's strength) sit above that area. */
    /* 3px wider on the left with the content where it was, so the photo's lock keeps its whole 48px area inside this box,
       which clips (round 8; overflow-clip-margin did this before, and Safari doesn't support it). */
    .lineup-slot .mls-player-row-info { flex: 1 1 auto; min-width: 0; align-self: stretch; margin-left: -3px; padding-left: 3px; }
    .lineup-slot .mls-player-row-text { position: relative; flex: 1 1 auto; min-width: 0; align-self: stretch; justify-content: center; }
    /* The name runs inline, so the "+N" / dots follow its last word, also when it wraps (round 7). */
    /* The line takes the name's own size, so it's no taller than the name was; the chip sits on the text's middle and its
       negative margins keep its 18px from growing the line. */
    .lineup-slot .mls-row-name-line { display: block; min-width: 0; font-size: 0.95rem; line-height: 1.3; }
    .lineup-slot .mls-row-name-line .player-name-wrap { display: inline; }
    .lineup-slot .mls-row-more { display: inline-flex; position: static; margin: -4px 0 -4px 6px; vertical-align: middle; cursor: pointer; }
    /* The column spans the row's height; the area reaches the row's edges (the divider) and 2px past, so the "+N" near
       the top of a short row still has 48px above and below it. */
    .lineup-slot .mls-row-more::after { content: ''; position: absolute; top: -10px; bottom: -10px; left: 0; right: 0; z-index: 1; }
    .lineup-slot .mls-player-row-text :is(button, a[href]):not(.mls-row-more) { position: relative; z-index: 2; }
    /* The rank badge's split parts (F6) paint in a layer of their own (clip-path), above that area; they aren't a control
       here, so a tap on them goes to the details. */
    .lineup-slot .mls-rank-badge { pointer-events: none; }

    /* Points over the swap button, one centre line. The swap is 44x30px, 48px tall with its hit area. */
    .lineup-slot .mls-row-actions { flex-direction: column; align-items: center; gap: 2px; padding-bottom: 2px; }
    .lineup-slot .mls-pts { margin-right: 0; align-items: center; min-width: 0; }
    .lineup-slot .swap-btn { position: relative; width: 44px; min-width: 44px; height: 30px; padding: 0; font-size: 0.95rem; }
    /* While swapping, an ✕ in the ⇄'s place (round 3): same size, so the points above don't move. */
    .lineup-slot .swap-btn .mls-swap-cancel-word { display: none; }
    .lineup-slot .swap-btn .mls-swap-cancel-x { display: block; margin: 0 auto; }
    .lineup-slot .swap-btn::after { content: ''; position: absolute; top: -9px; bottom: -9px; left: min(0px, (100% - 48px) / 2); right: min(0px, (100% - 48px) / 2); }
}

/* A phone Lineup row's details, in the shared sheet (js/mls/render/lineupDetails.js; improvements S32). */
.mls-details-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.25rem 0 0.75rem; }
.mls-details-head .slot-badge { min-width: 30px; text-align: center; font-size: 0.68rem; }
.mls-details-bye { color: var(--text-muted); font-size: 0.85rem; }
/* What the badge says about him (round 5), on its own line in the main text colour, above the Guide's sentence. */
.mls-details-this { display: block; margin-bottom: 2px; color: var(--text-main); font-weight: 600; }
.mls-details-list { margin: 0; }
.mls-details-actions { margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.mls-details-lock { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 1rem; font-size: 0.9rem; }
.mls-details-note, .mls-details-empty { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--text-muted); }

/* Round 3 (improvements S32, owner's go-ahead). Wider screens show the word "Cancel" in a swapping row's button; phones
   the ✕ (PHONE ROWS above). */
.mls-swap-cancel-x { display: none; }
/* An auto-locked row's edge is blue, like its padlock and the override control; a lock you set stays green. A swap in
   progress (amber) wins. */
.lineup-slot.autolocked:not(.swapping) { box-shadow: inset 3px 0 0 #60a5fa; }

/* The swap snackbar (Material 3's snackbar: one line and one action; js/mls/render/lineup.js showSwapSnackbar). At the
   toast's height: bottom left on wider screens (80px up over the tab bar, 24px beside the rail), above the tab bar with
   16px margins on phones. Amber like a swapping row. Only while the Lineup tab shows. A toast that comes while
   it's up sits above it. */
.mls-swap-snackbar {
    position: fixed;
    right: 24px;
    bottom: 80px;
    z-index: 1400;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    padding: 4px 4px 4px 16px;
    background: var(--card-bg, #131b2c);
    color: var(--text-main, #f3f4f6);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    transition: opacity var(--motion-effects-default-ms) var(--motion-effects-default), transform var(--motion-spatial-fast-ms) var(--motion-spatial-fast);
}
@starting-style { .mls-swap-snackbar { opacity: 0; transform: translateY(12px); } }
.mls-swap-snackbar[hidden] { display: none; }
/* Only while the Lineup tab shows. body[data-tab] and .mls-swap-pending are set by js/mls/nav.js and render/lineup.js
   (improvements F25): page-wide :has() selectors here made Chrome re-check the whole page after every change, which
   slowed Sync All on phones by about a third. */
body:not([data-tab="lineup"]) .mls-swap-snackbar { display: none; }
.mls-swap-snackbar-text { flex: 1; min-width: 0; padding: 10px 0; }
.mls-swap-snackbar-action {
    flex: none;
    min-height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #f59e0b;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
body[data-tab="lineup"].mls-swap-pending .mds-toast { margin-bottom: 80px; }
/* Round 4: on tablets and computers it sits at the content's start edge, bottom left (Material 3's place for a snackbar
   on a large screen), clear of the rows' swap buttons at the right; toasts stay at the right. On phones it runs across the
   screen above the tab bar, and the Lineup tab gets room at its foot while it shows, so the page scrolls clear of it. */
.mls-swap-snackbar { left: calc(var(--rail-inset, 0px) + 24px); right: auto; }
/* Wide enough for one line on tablets and computers (round 6: a phone on its side lost a third of its height to two). */
@media (min-width: 600px) {
    .mls-swap-snackbar { max-width: min(640px, calc(100vw - var(--rail-inset, 0px) - 48px)); }
}
@media (max-width: 599.98px) {
    .mls-swap-snackbar { left: 16px; right: 16px; max-width: none; bottom: calc(90px + env(safe-area-inset-bottom)); }
    body.mls-swap-pending #lineupTab.active { padding-bottom: 96px; }
}
@media (min-width: 840px) {
    .has-nav-bar .mls-swap-snackbar { bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    .mls-swap-snackbar { transition: none; }
}
