/* Mobile density only; desktop tracks and financial controls stay unchanged. */
.compact-date-value {display:none}
.mobile-function-actions,.mobile-function-expand {display:none}
.mobile-lottery-number {display:none}
@media (max-width:759px) {
  html body[data-page-mode=workbench] #matchList {
    --interval-mobile-border:#991b1b;
    --interval-mobile-heading:#fce7ef;
    --interval-mobile-ink:#701a36;
  }
  html body[data-page-mode=workbench] #matchList .interval-section {
    border:3px solid var(--interval-mobile-border)!important;border-radius:0!important;
    box-sizing:border-box!important;margin:0 0 8px!important;
  }
  html body[data-page-mode=workbench] #matchList .interval-section-title {
    background:var(--interval-mobile-heading)!important;color:var(--interval-mobile-ink)!important;
  }
  html body[data-page-mode=workbench] #matchList .interval-section-title small {color:inherit!important}
  html body[data-page-mode=workbench] .mobile-lottery-number {display:inline;margin-left:1px;font-size:9px;font-variant-numeric:tabular-nums}
  html body[data-page-mode=workbench] #matchList .match-row-data {
    outline:1px solid #143c78!important;outline-offset:-1px!important;
    border-bottom-color:#143c78!important;
  }
  html body[data-page-mode=workbench] .v3-page-heading {display:none!important}
  html body[data-page-mode=workbench].research-filters-collapsed .primary-nav {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel {
    display:grid!important;grid-template-columns:minmax(32px,50px) minmax(32px,50px) repeat(4,minmax(32px,1fr))!important;
    align-items:end!important;gap:4px 3px!important;padding:6px 3px!important;position:relative;
  }
  html body[data-page-mode=workbench] #researchFilterPanel :is(.toolbar-card,.date-controls,.quick-date-actions,.research-filters) {display:contents!important}
  html body[data-page-mode=workbench] #researchFilterPanel .date-field {grid-row:1!important;display:grid!important;gap:2px!important;min-width:0!important;position:relative}
  html body[data-page-mode=workbench] #researchFilterPanel .date-field:first-child {grid-column:1!important}
  html body[data-page-mode=workbench] #researchFilterPanel .date-field:nth-child(2) {grid-column:2!important}
  html body[data-page-mode=workbench] #researchFilterPanel .date-field label {font-size:10px!important;line-height:12px!important;white-space:nowrap!important}
  html body[data-page-mode=workbench] #researchFilterPanel .date-field input {
    width:100%!important;min-height:25px!important;height:25px!important;padding:0 2px!important;
    font-size:11px!important;line-height:23px!important;box-sizing:border-box!important;background-image:none!important;text-align:center!important;
  }
  html body[data-page-mode=workbench] #researchFilterPanel .date-field:has(.compact-date-value) input {color:transparent!important;caret-color:transparent!important}
  html body[data-page-mode=workbench] #researchFilterPanel .compact-date-value {
    display:flex!important;position:absolute;bottom:0;left:0;right:0;height:25px;align-items:center;justify-content:center;
    font-size:11px;line-height:25px;color:var(--ink);pointer-events:none;white-space:nowrap;
  }
  html body[data-page-mode=workbench] #researchFilterPanel .date-field label {
    position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
    overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;border:0!important;
  }
  html body[data-page-mode=workbench] #exportResearchExcel {grid-column:6!important;grid-row:1!important}
  html body[data-page-mode=workbench] #researchFilterPanel .league-multi-filter {grid-column:3!important;grid-row:1!important;position:static!important;min-width:0!important;width:100%!important}
  html body[data-page-mode=workbench] #researchFilterPanel .league-multi-filter>span {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel .r4-filter-toggle {grid-column:5!important;grid-row:1!important}
  html body[data-page-mode=workbench] #researchFilterPanel :is(#exportResearchExcel,#queryResearch,#leaguePickerTrigger,.r4-filter-toggle,[data-status-filter]) {
    min-height:25px!important;height:25px!important;padding:0 1px!important;font-size:12px!important;line-height:23px!important;
    white-space:nowrap!important;min-width:0!important;width:100%!important;box-sizing:border-box!important;
  }
  html body[data-page-mode=workbench] #researchFilterPanel :is(.toolbar-status,#freshnessHelp,[data-date-mode]) {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel :is(.status-filter,.region-filter) {grid-column:1/-1!important;flex-wrap:wrap!important}
  html body[data-page-mode=workbench] #researchFilterPanel .research-filters>.status-filter {display:contents!important}
  html body[data-page-mode=workbench] #researchFilterPanel .status-filter>span {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel [data-status-filter] {grid-row:1!important}
  html body[data-page-mode=workbench] #researchFilterPanel [data-status-filter=upcoming] {grid-column:5!important}
  html body[data-page-mode=workbench] #researchFilterPanel [data-status-filter=all] {grid-column:4!important}
  html body[data-page-mode=workbench] #researchFilterPanel [data-status-filter=finished] {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel :is(.r4-filter-toggle,.region-filter) {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel[hidden] {display:none!important}
  html body[data-page-mode=workbench] #researchFilterPanel .mobile-function-actions {display:grid!important;grid-template-columns:103px repeat(3,minmax(0,1fr));grid-column:1/-1;grid-row:2;gap:3px;padding-top:4px}
  html body[data-page-mode=workbench] #researchFilterPanel .mobile-function-actions button {width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;height:25px!important;min-height:25px!important;line-height:23px!important;padding:0 10px!important;font-size:12px!important;box-sizing:border-box!important}
  html body[data-page-mode=workbench] #researchFilterPanel :is(#exportResearchExcel,#queryResearch,#leaguePickerTrigger,[data-status-filter]) {
    font-size:12px!important;font-weight:600!important;line-height:23px!important;
    border:1px solid var(--line)!important;border-radius:0!important;
    background:linear-gradient(#fff,#f6f8fc)!important;color:var(--ink)!important;
    box-shadow:0 2px 0 #dce3ec!important;
  }
  html body[data-page-mode=workbench] #researchFilterPanel [data-status-filter].active {border-color:var(--primary)!important;color:var(--primary)!important;background:#edf3ff!important}
  html body[data-page-mode=workbench] #researchFilterPanel :is(#exportResearchExcel,#queryResearch,#leaguePickerTrigger,[data-status-filter]):active:not(:disabled) {transform:translateY(1px);box-shadow:none!important}
  html body[data-page-mode=workbench] .matches-card>.section-heading {display:none!important}
  html body[data-page-mode=workbench] .mobile-function-expand:not([hidden]) {
    display:block!important;position:fixed;right:12px;top:calc(8px + env(safe-area-inset-top,0px));z-index:60;
    min-height:36px;padding:4px 12px;border:1px solid var(--primary);border-radius:18px;box-shadow:0 3px 10px #17243b30;
  }
  html body[data-page-mode=workbench] #researchFilterPanel .league-picker {
    position:fixed!important;left:12px!important;right:12px!important;top:calc(78px + env(safe-area-inset-top,0px))!important;
    width:auto!important;max-width:none!important;max-height:calc(100dvh - 100px)!important;overflow:auto;box-sizing:border-box;z-index:90;
  }
  html body[data-page-mode=workbench] #leaguePickerOptions {max-height:calc(100dvh - 190px)!important;overflow:auto}
  html body[data-page-mode=workbench] #leaguePickerTrigger {overflow:hidden!important;text-overflow:ellipsis!important}
  html body[data-page-mode=workbench] #researchFilterPanel button,
  html body[data-page-mode=workbench] .mobile-function-expand {
    font-family:inherit!important;font-size:12px!important;font-weight:600!important;
    font-style:normal!important;letter-spacing:normal!important;border-radius:0!important;
  }
  html body:is([data-page-mode=workbench],[data-page-mode=history]) .interval-section-title {
    min-height:24px!important;padding:2px 10px!important;line-height:20px!important;font-size:12px!important;
  }
  html body:is([data-page-mode=workbench],[data-page-mode=history]) .match-title-actions button,
  html body:is([data-page-mode=workbench],[data-page-mode=history]) .r4-filter-toggle {
    min-height:24px!important;height:auto!important;padding:2px 8px!important;line-height:20px!important;font-size:12px!important;
  }
  html body:is([data-page-mode=workbench],[data-page-mode=history]) .matches-card>.section-heading {padding:6px 10px!important}
  html body :is(#matchList,.conclusion-match-table) .match-row:not(.header) {
    grid-template-columns:38px 48px minmax(0,1fr)!important;gap:5px 4px!important;padding:7px 8px!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .match-time {grid-column:1!important;grid-row:1!important;font-size:11px!important;white-space:nowrap!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-league {grid-column:2!important;grid-row:1!important;gap:1px!important;font-size:11px!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .league-pill {font-size:11px!important;line-height:1.25!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .matchup-group {
    grid-column:1/-1!important;grid-row:1!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;
    width:calc((100% - 44px)*.726)!important;justify-self:end!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .team-label {
    display:block!important;font-size:12px!important;line-height:1.3!important;
    max-width:5em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;transform:none!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .match-team:first-child .team-label {margin-left:auto!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-score {font-size:14px!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-odds {
    grid-column:1/-1!important;grid-row:auto!important;width:calc(58px + (100% - 44px)*.726)!important;max-width:100%!important;justify-self:end!important;
    padding:0 0 0 58px!important;gap:8px!important;box-sizing:border-box!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .match-odds::before {
    width:52px!important;white-space:nowrap!important;overflow-wrap:normal!important;
    font-size:11px!important;line-height:20px!important;left:0!important;right:auto!important;
    top:50%!important;transform:translateY(-50%)!important;text-align:left!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .match-odds>:is(span,button) {
    min-height:24px!important;height:24px!important;padding:1px 2px!important;line-height:20px!important;font-size:12px!important;
    white-space:nowrap!important;overflow-wrap:normal!important;box-sizing:border-box!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .match-market {grid-column:1/-1!important;grid-row:auto!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-team:first-child .team-label {text-align:right!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-team:last-child .team-label {text-align:left!important}
  /* Mobile workbench tags share the odds tracks, never the team/score track. */
  html body[data-page-mode=workbench] #matchList .match-row .match-league,
  html body[data-page-mode=workbench] #matchList .match-row .match-lottery-tags {display:contents!important}
  html body[data-page-mode=workbench] #matchList .match-row .league-pill {
    grid-column:2!important;grid-row:1!important;align-self:center!important;justify-self:start!important;max-width:48px!important;
    display:block!important;height:15.6px!important;min-height:0!important;line-height:15.6px!important;
    padding:0 2px!important;box-sizing:border-box!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  html body[data-page-mode=workbench] #matchList .match-row .match-lottery-tag {
    grid-column:1!important;align-self:center!important;justify-self:start!important;
    white-space:nowrap!important;font-size:10px!important;line-height:16px!important;margin:0!important;padding:0!important;
  }
  html body[data-page-mode=workbench] #matchList .match-row .lottery-jingcai {grid-row:2!important}
  html body[data-page-mode=workbench] #matchList .match-row .lottery-sfc {grid-row:3!important}
  html body[data-page-mode=workbench] #matchList .match-row .opening-odds {grid-row:2!important}
  html body[data-page-mode=workbench] #matchList .match-row .final-odds {grid-row:3!important}
  html body[data-page-mode=workbench] #matchList .match-row .match-market {grid-row:4!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-market.r4-volume-ready {
    display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .market-total {
    justify-content:center!important;text-align:center!important;width:100%!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .r4-volume-summary {text-align:center!important;width:100%!important}
  html body :is(#matchList,.conclusion-match-table) .match-row .match-market.r4-volume-ready:has(.r4-distribution.is-unavailable) {
    flex-direction:row!important;justify-content:center!important;flex-wrap:nowrap!important;gap:8px!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .match-market:has(.r4-distribution.is-unavailable) :is(.market-total,.r4-volume-summary) {
    width:auto!important;white-space:nowrap!important;flex:none!important;
  }
  html body :is(#matchList,.conclusion-match-table) .match-row .r4-distribution.is-unavailable {display:none!important}
}
