/* Season reference-panel, note, table-wrap and standings markup/CSS are reused.
   Only the card league clock/cost composition is scoped here. */
/* Compact match status is composed inside the existing season lobby button. */
.league-match-state{box-sizing:border-box;display:flex!important;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;margin-top:8px;padding-top:8px;border-top:1px solid currentColor;font:12px/1.4 Ntreev,system-ui}
.league-match-state b{font-size:13px;white-space:nowrap}.league-state-badge{display:inline-flex;white-space:nowrap}.league-match-state.is-locked .league-state-badge{font-weight:700}
.league-cost-line{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:7px;width:100%;max-width:100%;min-width:0;margin:7px 0;padding:7px 9px!important;white-space:nowrap;font:12px/1.4 Ntreev,system-ui;text-align:left}
.league-cost-line small{font-size:11px;flex:none;color:inherit}.league-cost-line span{min-width:0}
.league-status-compact{display:flex;align-items:center;gap:20px;padding:9px 12px;background:var(--surface);border-block:1px solid var(--stroke)}
.league-status-compact>.league-match-state{margin:0;padding:0;border:0;flex:1}.league-status-compact>.league-cost-line{width:auto;flex:none;margin:0;padding:5px 8px!important}
.league-cost-table{width:100%;min-width:0!important}.league-cost-table td[aria-current=true]{font-weight:700;color:var(--accent,#f1d186);box-shadow:inset 0 0 0 1px currentColor}
.replacement-cost.is-over-cost{color:#e7ad61;font-weight:700}
@media(max-width:690px){.league-status-panel.reference-panel{padding:10px}.league-status-heading{align-items:flex-start;flex-direction:column}.league-cost-table th,.league-cost-table td{padding:9px 6px!important;font-size:12px!important}}

.light .league-cost-table td[aria-current=true]{color:#78551a}

#card-dossier .dossier-bonus-table{max-width:100%;overflow-x:auto}
#card-dossier .dossier-bonus-table table{width:max-content;min-width:100%;table-layout:auto}
#card-dossier .dossier-bonus-table th,#card-dossier .dossier-bonus-table td{min-width:58px;padding:8px 7px;white-space:nowrap}
#card-dossier .dossier-bonus-table th[scope=row]{position:sticky;left:0;background:var(--surface);z-index:1}

/* Season mode season-table / season-calendar markup and CSS together.
   Source: season-ui.mjs (calendar) and web-shell/app.css, lines 393-394. */
.league-workspace .season-table{overflow:auto;max-width:100%;border:1px solid var(--stroke);border-radius:4px;overscroll-behavior:contain}
.league-workspace .season-table table{white-space:nowrap;width:100%;font-size:13px;border-collapse:collapse;table-layout:auto}
.league-workspace .season-table td,.league-workspace .season-table th{padding:11px 8px;text-align:center;border-bottom:1px solid var(--stroke)}
.league-workspace .season-table thead{background:var(--soft);color:var(--text)}
.league-workspace .season-table th[scope=row]{text-align:left;white-space:normal;overflow-wrap:anywhere;max-width:240px}
.league-workspace .season-table tr.my-club{color:var(--tc-accent-text,#e9c36f);background:var(--soft)}
.league-workspace .season-table tr.my-club th{box-shadow:inset 3px 0 currentColor}
.league-workspace .season-calendar{display:flex;flex-direction:column;gap:4px}
.league-workspace .season-calendar button{box-sizing:border-box;display:flex;align-items:center;text-align:left;gap:12px;width:100%;padding:10px;font:13px Ntreev,system-ui}
.league-workspace .season-calendar button:disabled{opacity:1;color:var(--text);background:var(--surface)}
.league-workspace .season-calendar time{font-size:12px;color:var(--tc-accent-text,#e9c36f)}
.league-workspace .season-calendar span{flex:1;display:block;min-width:0;overflow-wrap:anywhere}
.league-workspace .season-calendar small{display:block;font-size:11px;color:var(--sub);margin-top:4px}
.league-workspace .season-calendar em{font-style:normal;font-size:13px;text-align:right;flex:none}
.league-workspace .season-calendar .calendar-today{border-color:#bb934d}
.online-league-page.league-workspace{padding:0;background:var(--surface);border:1px solid var(--stroke);border-radius:5px;overflow:hidden}
.league-season-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:var(--soft);border-bottom:1px solid var(--stroke)}
.league-season-heading strong{font-size:18px}.league-season-heading span{color:var(--sub);font-size:12px}
.league-view-tabs{padding:10px 12px 0;margin:0!important;display:flex;gap:5px}.league-view-tabs button{min-height:36px}
.league-day-tabs{margin:0!important;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:10px 12px}
.league-day-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;padding:8px 3px;min-height:39px;font-family:Ntreev,system-ui}
.league-day-tabs small{font-size:11px;color:var(--sub)}.league-day-tabs .is-today b{color:var(--tc-accent-text,#e9c36f)}
.league-workspace .league-fixtures,.league-workspace .league-ranking{margin:0 12px 12px}
.league-fixtures h2,.league-ranking h2{font-size:14px!important}.league-fixtures h2 small{color:inherit}
.league-workspace .season-table .league-score{font-weight:700;min-width:65px}
.league-workspace .season-table tr.is-live{background:var(--soft);box-shadow:inset 3px 0 #d9b562}
.league-workspace .outcome-win,.league-workspace .league-win{color:#e57c85}.league-workspace .outcome-loss,.league-workspace .league-loss{color:#79afec}
.light .league-workspace .outcome-win,.light .league-workspace .league-win{color:#aa3346}.light .league-workspace .outcome-loss,.light .league-workspace .league-loss{color:#255e9b}
.league-workspace .league-fixtures-mobile{display:none}.league-rules-summary{margin:12px;padding:8px 10px;border-top:1px solid var(--stroke);font-size:12px;color:var(--sub)}
.league-rules-summary summary{cursor:pointer}.league-empty,.league-postseason{padding:12px}
.league-fixtures footer small{color:var(--sub);font-size:12px;margin-left:auto}
@media(max-width:690px){
 .league-status-compact{flex-direction:column;align-items:stretch;gap:5px;padding:9px 10px}.league-status-compact>.league-cost-line{width:100%;margin:0}
 .league-workspace .league-fixtures-desktop{display:none}.league-workspace .league-fixtures-mobile{display:flex;padding:5px}
 .league-season-heading{padding:11px 10px;align-items:flex-start;flex-direction:column;gap:4px}.league-season-heading strong{font-size:16px}
 .league-view-tabs{padding:8px 8px 0}.league-view-tabs button{flex:1;padding:7px 4px;font-size:12px}
 .league-day-tabs{padding:8px;gap:3px}.league-day-tabs button{flex-direction:column;gap:3px;padding:6px 2px}.league-day-tabs small{font-size:9px}
 .league-workspace .league-fixtures,.league-workspace .league-ranking{margin:0 8px 8px}
 .league-workspace .season-table td,.league-workspace .season-table th{padding:10px 5px;font-size:12px}
 .league-workspace .season-table th[scope=row]{max-width:130px}.league-workspace .season-table small{display:block;font-size:10px}
 .league-fixtures footer small{margin:0;flex-basis:100%;line-height:1.5}
}
@media(max-width:350px){.league-cost-line{font-size:11px}.league-match-state{font-size:11px}.league-match-state b{font-size:12px}}

@media(min-width:691px){
 .league-workspace .league-fixtures-desktop{max-height:max(230px,calc(100dvh - 440px))}
 .league-workspace .league-fixtures-desktop thead{position:sticky;top:0;z-index:1}
}

.league-workspace .is-complete[data-act]{cursor:pointer}.league-workspace .is-complete[data-act]:hover{background:var(--soft)}
.league-workspace .league-score button{min-height:28px;padding:3px 8px;font:inherit;color:inherit}
#dialog[data-modal-kind=league-replay]{width:min(1040px,calc(100vw - 24px));max-width:calc(100vw - 24px)}
#dialog[data-modal-kind=league-replay] .dialog-body{overflow:auto}
/* Season lobby schedule button and theme tokens, combined into one match panel. */
.card-season-lobby .lobby-league-panel{margin:0 0 10px;border:1px solid var(--ui-accent);border-radius:var(--ui-radius-modal);background:var(--ui-accent);color:var(--ui-on-accent);overflow:hidden;text-shadow:none}
.card-season-lobby .lobby-league-panel>.lobby-schedule{margin:0;border:0;border-radius:0;background:transparent;color:inherit;padding:12px 13px;box-shadow:none}
.card-season-lobby .lobby-league-panel .lobby-schedule-heading{margin:9px 0 5px;align-items:baseline}
.card-season-lobby .lobby-league-panel .lobby-schedule-heading strong{font-size:13px}
.card-season-lobby .lobby-league-panel .lobby-schedule-heading small{font-size:10px;white-space:nowrap}
.lobby-schedule>.league-lobby-summary{display:grid;gap:5px;text-align:left;padding-bottom:9px;border-bottom:1px solid color-mix(in srgb,currentColor 25%,transparent);font:12px/1.45 Ntreev,system-ui}
.league-lobby-summary>strong{font-size:16px;line-height:1.3}
.league-lobby-summary>[data-league-field=recordLine]{font-size:11px;white-space:normal;overflow-wrap:anywhere}
.card-season-lobby .lobby-league-panel .league-match-state{margin-top:9px;padding-top:8px;border-color:color-mix(in srgb,currentColor 25%,transparent)}
.card-season-lobby .lobby-league-panel>.league-cost-line{margin:0;border:0;border-top:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:0;background:color-mix(in srgb,currentColor 7%,transparent);color:inherit;padding:7px 13px!important;font-size:11px}
.card-season-lobby .lobby-league-panel>.league-cost-line:hover{background:color-mix(in srgb,currentColor 13%,transparent)}
.light .card-season-lobby .lobby-league-panel{background:linear-gradient(135deg,color-mix(in srgb,var(--ui-accent) 20%,#f5efe2),color-mix(in srgb,var(--ui-accent) 14%,#e7dfd0));color:#29383b;border-color:color-mix(in srgb,var(--ui-accent) 40%,#8d826f)}
@media(max-width:350px){.card-season-lobby .lobby-league-panel>.lobby-schedule{padding:11px 10px}.card-season-lobby .lobby-league-panel>.league-cost-line{padding-inline:10px!important;font-size:10px}.league-lobby-summary>strong{font-size:14px}.league-lobby-summary>[data-league-field=recordLine]{font-size:10px}}

/* One compact current-cost / today's-limit value, followed by tomorrow's limit. */
.league-cost-line{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:10px;row-gap:4px;padding:8px 10px!important}
.league-cost-phase{color:var(--sub);font-size:12px}.league-cost-phase>b{color:var(--text)}
.league-cost-total{font-size:15px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.league-cost-tomorrow{color:var(--sub);white-space:nowrap}.league-cost-tomorrow>b{color:var(--text);font-variant-numeric:tabular-nums}
.league-cost-separator{color:var(--sub);opacity:.65}
.league-cost-line.is-over-cost .league-cost-total{color:#ff6b76}
body.light .league-cost-line.is-over-cost .league-cost-total{color:#bd1638}
.league-cost-link{margin-inline-start:auto;text-decoration:underline;text-underline-offset:3px}
@media(max-width:690px){.league-cost-line{column-gap:7px}.league-cost-total{font-size:14px}.league-cost-link{font-size:10px}}

#page.page-lineup>.league-cost-line{flex:none;height:auto;min-height:40px}
@media(max-width:690px){#page.page-lineup>.league-cost-line{min-height:40px}}

/* Season potential badge markup and sizing, scoped to the standings label.
   Reference: potential-ui.mjs renderPotentialBadge / web-shell/field.css:464.
   Supply-tier colors retain contrast in both card mode themes. */
.league-workspace .season-table .league-own-club-badge{
 display:inline-block;vertical-align:middle;margin-inline-start:6px;
 padding:2px 5px;border:1px solid #69b8d0;border-radius:2px;
 background:#183843;color:#bdeaff;font:700 11px/1.2 Ntreev,system-ui,sans-serif;
 white-space:nowrap;letter-spacing:-.04em;
}
.light .league-workspace .season-table .league-own-club-badge{
 background:#d8f1f9;color:#144c61;border-color:#347e94;
}

.light .league-workspace .season-table tr.my-club{color:var(--text)}
.light .league-workspace .season-table tr.my-club th{box-shadow:inset 3px 0 #347e94}

/* Keep all standing columns accessible instead of hiding them on phones. */
.league-workspace .league-standings-scroll{touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
.league-workspace .league-standings-scroll table{min-width:780px}
.league-workspace .league-movement-badge{display:none}
@media(max-width:690px){
 .league-workspace .league-movement-badge{display:inline-block;margin-inline-start:5px;padding:2px 4px;border:1px solid currentColor;border-radius:2px;font:11px/1.2 Ntreev,system-ui,sans-serif;white-space:nowrap}
 .league-workspace .league-movement-badge.up{color:#7bd6e8;background:#12323b}
 .league-workspace .league-movement-badge.down{color:#ffc0ae;background:#49291f}
 .light .league-workspace .league-movement-badge.up{color:#075c70;background:#dff5fa}
 .light .league-workspace .league-movement-badge.down{color:#9a3115;background:#ffe8df}
}
