html[data-theme="light"] {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --muted: #64748b;
  --grid: #e8eef7;
  --accent: #2162d6;
  --up: #047857;
  --down: #b91c1c;
  --scanner-filter-label-color: rgba(51, 65, 85, 0.86);
  --scanner-filter-btn-bg: #ffffff;
  --scanner-filter-btn-border: #cbd5e1;
  --scanner-filter-btn-hover-bg: #eef4ff;
  --scanner-filter-btn-hover-border: #93b5ee;
  --ui-label-color: rgba(51, 65, 85, 0.86);
}

html[data-theme="light"] body.app-shell.page-shell.scanner-shell {
  background:
    radial-gradient(circle at 16% 8%, rgba(4, 111, 243, 0.11), transparent 18rem),
    radial-gradient(circle at 84% 10%, rgba(20, 184, 166, 0.07), transparent 18rem),
    linear-gradient(180deg, #fbfdff 0%, #f4f7fb 46%, #eef3f9 100%);
  color: #102033;
}

html[data-theme="light"] body.app-shell :where(#root),
html[data-theme="light"] body.app-shell :where(#root) .page,
html[data-theme="light"] body.app-shell :where(#root) .card {
  background: transparent;
  color: #102033;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .scanner-panel,
  .scanner-mobileSectionSwitch,
  .summary-toolbar,
  .summary-cut__box,
  .scanner-matchStatsBar,
  .scanner-outcomeStatCard,
  .scanner-matchCard,
  .cards-card,
  .scanner-matchCard__board,
  .scanner-matchCard__cutControl,
  .scanner-matchCard__cutStamp,
  .scanner-resultBox,
  .scanner-strategyBar,
  .scanner-strategyCard,
  .scanner-strategyAlert,
  .scanner-calendarModal,
  .scanner-tourStatsCalendarDemo,
  .scanner-tourGraphRealDemo__chartFrame,
  .scanner-tourGraphRealDemo__volumePanel,
  .graph-matchHeader,
  .toolbar,
  .graph-help,
  .chart-frame,
  .summary-frame,
  .ohlc-wrap,
  .gt-modal,
  .metrics-help-card,
  .metrics-help-overviewBlock,
  .metrics-help-miniDef,
  .metrics-help-pctCard,
  .cal__panel,
  .scan-pick__picked,
  .scan-pick__pickedChip
) {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #102033;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__top {
  border-bottom-color: rgba(148, 163, 184, 0.22) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%) !important;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.12) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__board {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__info {
  background: transparent !important;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .scanner-panel__title,
  .page-title,
  .gt-title,
  .scanner-modalTitle,
  .scanner-matchCard__boardName,
  .scanner-matchCard__boardScore,
  .graph-matchHeader .scanner-matchCard__boardName,
  .graph-matchHeader .scanner-matchCard__boardScore,
  .scanner-outcomeStatCard__title,
  .scanner-statPill strong,
  .scanner-resultPeriodTitle,
  .metric-row__label,
  .metric-val__v,
  .metrics-help-miniDef strong,
  .metrics-help-pctCard__label,
  .scanner-calendarModal__title,
  .cal__navTitle,
  .cal__panelTitle,
  .sumtbl__td--name
) {
  color: #102033;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .muted,
  .scanner-panel__sub,
  .scanner-panel__subSummary,
  .summary-toolbar__label,
  .scanner-row__label,
  .scanner-matchCard__boardCtx,
  .scanner-matchCard__boardTime,
  .scanner-matchCard__cutControlLabel,
  .scanner-modalHint,
  .gt-hint,
  .scanner-resultRowLabel,
  .scanner-resultDash,
  .scanner-calendarModal__subtitle,
  .cal__loading,
  .cal__weekday,
  .cal__statLabel,
  .scanner-busyOverlay__sub,
  .scanner-tourGraphRealDemo__volumeTitle
) {
  color: #64748b;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  button,
  .seg-btn,
  select,
  input,
  textarea,
  .gt-input,
  .scanner-num,
  .summary-toggle,
  .hint-chip,
  .gt-clear-btn,
  .modal-help-toggle,
  .scanner-modalCloseBtn,
  .calendar-demo__nav,
  .calendar-demo__close,
  .calendar-demo__openDay
) {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #102033;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  button:hover,
  .seg-btn:hover,
  select:hover,
  .gt-clear-btn:hover,
  .hint-chip:hover,
  .scanner-modalCloseBtn:hover
) {
  border-color: rgba(33, 98, 214, 0.36);
  background: #eef4ff;
  color: #0f2e62;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .seg-btn.active,
  .seg-btn[aria-pressed="true"],
  .summary-toggle.active,
  .summary-toggle[aria-pressed="true"],
  .btn-primary,
  .scanner-branchAlertBtn.is-active,
  .scanner-matchWindowBtn.active,
  .modal-help-inline[open] > .modal-help-toggle
) {
  border-color: #2162d6;
  background: #2162d6;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(33, 98, 214, 0.16);
}

html[data-theme="light"] body.app-shell :where(#root) :is(button:disabled, .seg-btn:disabled, select:disabled) {
  border-color: #d7dee8;
  background: #f1f5f9;
  color: #94a3b8;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .toolbar--bottom button:not(.help-icon),
  .toolbar--bottom input[type="number"],
  .toolbar--bottom select,
  .chart-layout__summary .seg-btn.summary-toggle
) {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #102033;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .chart-layout__summary .seg-btn.summary-toggle.active,
  .chart-layout__summary .seg-btn.summary-toggle[aria-pressed="true"]
) {
  border-color: #2162d6;
  background: #2162d6;
  color: #ffffff;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .scanner-matchCard__boardLogo,
  .graph-matchHeader .scanner-matchCard__boardLogo,
  .scanner-matchCard__halves > span,
  .scanner-matchCard__cutStamp,
  .scanner-statPill,
  .metric-val,
  .metric-row,
  .summary-toolbar__buttons,
  .scan-pick__pickedChip,
  .cal__day,
  .cal__pill
) {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.94);
  color: #334155;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .scanner-matchCard__cutStampLabel,
  .scanner-matchCard__cutControlArrow,
  .summary-sort-arrow,
  .scanner-sortArrow,
  .gt-label,
  .metrics-help-overviewTitle,
  .metrics-help-demoTitle,
  .metrics-help-note,
  .metrics-help-miniDef span
) {
  color: #2162d6;
}

html[data-theme="light"] body.app-shell :where(#root) :is(.gt-backdrop, .scanner-busyOverlay) {
  background: rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] body.app-shell :where(#root) .scanner-busyOverlay__card {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

body.scanner-ui {
  --scanner-sticky-header-offset: 78px;
}

body.app-shell.scanner-shell :where(#root) .scanner-formDialog :is(input.gt-input, textarea.gt-input, select.gt-input) {
  border-color: #2b3a57 !important;
  background: #101726 !important;
  color: #e5f2ff !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-formDialog :is(input.gt-input, textarea.gt-input, select.gt-input):focus {
  border-color: #3c82ff !important;
  background: #101726 !important;
  box-shadow: 0 0 0 1px rgba(60, 130, 255, 0.6) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-formDialog :is(input.gt-input, textarea.gt-input, select.gt-input) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-formDialog :is(input.gt-input, textarea.gt-input, select.gt-input):focus {
  border-color: #2162d6 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(33, 98, 214, 0.28) !important;
}

body.app-shell.scanner-shell.scanner-ui :where(#root) :is(
  .scanner-outcomeSelect,
  .scanner-outcomeStatPnlStakeInput,
  .scanner-strategyStatStakeInput
) {
  border-color: #2b3a57 !important;
  background: #101726 !important;
  color: #e5f2ff !important;
  -webkit-text-fill-color: #e5f2ff !important;
}

body.app-shell.scanner-shell.scanner-ui :where(#root) :is(
  .scanner-outcomeSelect,
  .scanner-outcomeStatPnlStakeInput,
  .scanner-strategyStatStakeInput
):focus {
  border-color: #3c82ff !important;
  background: #101726 !important;
  box-shadow: 0 0 0 1px rgba(60, 130, 255, 0.6) !important;
}

@media (min-width: 1201px) {
  body.scanner-ui :where(#root) .scanner-flex {
    min-height: calc(100dvh - var(--scanner-sticky-header-offset) - 32px);
  }

  body.scanner-ui :where(#root) .scanner-panel--filters,
  body.scanner-ui :where(#root) .scanner-panel--leagues {
    top: calc(var(--scanner-sticky-header-offset) + 16px);
    max-height: calc(100dvh - var(--scanner-sticky-header-offset) - 32px);
  }
}

/* Strategy-aware empty state in the Match view (desktop and mobile). */
body.app-shell.scanner-shell :where(#root) .scanner-emptyState {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 28px 24px;
  border: 1px solid rgba(82, 153, 255, 0.28);
  border-radius: 16px;
  background: rgba(11, 31, 58, 0.58);
  text-align: center;
}

body.app-shell.scanner-shell :where(#root) .scanner-emptyState__title {
  color: #f5f8ff;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 800;
  line-height: 1.25;
}

body.app-shell.scanner-shell :where(#root) .scanner-emptyState__text {
  max-width: 560px;
  color: #aebdd0;
  font-size: 14px;
  line-height: 1.5;
}

body.app-shell.scanner-shell :where(#root) .scanner-emptyState__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

body.app-shell.scanner-shell :where(#root) .scanner-emptyState__actions :is(.btn-primary, .seg-btn) {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
  touch-action: manipulation;
}

@media (max-width: 560px) {
  body.app-shell.scanner-shell :where(#root) .scanner-emptyState {
    margin: 6px 0;
    padding: 24px 16px;
    border-radius: 14px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-emptyState__title {
    font-size: 18px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-emptyState__text {
    font-size: 15px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-emptyState__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-emptyState__actions :is(.btn-primary, .seg-btn) {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }
}

@media (max-width: 1200px) {
  body.scanner-ui :where(#root) .scanner-panel--filters,
  body.scanner-ui :where(#root) .scanner-panel--leagues {
    max-height: none;
  }
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .sumtbl th,
  .sumtbl td,
  .summary-table th,
  .summary-table td,
  .outcome-card__table th,
  .outcome-card__table td,
  .metrics-help-pctCard__k,
  .metrics-help-pctCard__v
) {
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="light"] body.app-shell :where(#root) :is(.sumtbl thead th, .summary-table thead th) {
  background: #f1f5f9;
  color: #475569;
}

html[data-theme="light"] body.app-shell :where(#root) :is(.recharts-cartesian-axis-tick-value, .scanner-tourGraphRealDemo__tick) {
  fill: #64748b;
}

html[data-theme="light"] body.app-shell :where(#root) :is(
  .chart-grid,
  .chart-grid-v,
  .scanner-tourGraphRealDemo__grid,
  .scanner-tourGraphRealDemo__gridV
) {
  stroke: rgba(100, 116, 139, 0.18);
}

html[data-theme="light"] body.app-shell :where(#root) :is(.chart-axis, .scanner-tourGraphRealDemo__axis) {
  stroke: rgba(100, 116, 139, 0.44);
}

html[data-theme="light"] body.app-shell :where(#root) :is(.is-up, .up, .cal__statValue.is-up) {
  color: #047857 !important;
}

html[data-theme="light"] body.app-shell :where(#root) :is(.is-down, .down, .cal__statValue.is-down) {
  color: #b91c1c !important;
}

html[data-theme="light"] body.app-shell :where(#root) :is(.pct-chip.up, .metrics-help-pctCard__v--pct.is-up) {
  background: rgba(4, 120, 87, 0.12);
}

html[data-theme="light"] body.app-shell :where(#root) :is(.pct-chip.down, .metrics-help-pctCard__v--pct.is-down) {
  background: rgba(185, 28, 28, 0.12);
}

html[data-theme="light"] .site-header .site-theme-switch {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(226, 232, 240, 0.68);
}

html[data-theme="light"] .site-header .site-theme-switch .site-theme-switch__button {
  border: 0;
  background: transparent;
  color: #64748b;
}

html[data-theme="light"] .site-header .site-theme-switch .site-theme-switch__button.is-active {
  background: #2162d6;
  color: #ffffff;
}

html[data-theme="light"] #modalAuthRequired.overlay {
  background: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] #modalAuthRequired .modal {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.96);
  color: #102033;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] #modalAuthRequired .modal p,
html[data-theme="light"] #modalAuthRequired .legal {
  color: #475569 !important;
}

html[data-theme="light"] #modalAuthRequired .btn-ghost {
  color: #143257;
  border-color: rgba(100, 116, 139, 0.28);
  background: #ffffff;
}

html[data-theme="light"] body #modalAuthRequired.overlay[data-band-modal] {
  background: rgba(15, 23, 42, 0.16) !important;
}

html[data-theme="light"] body #modalAuthRequired .modal {
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #102033 !important;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.18) !important;
}

html[data-theme="light"] body #modalAuthRequired .modal h3,
html[data-theme="light"] body #modalAuthRequired .modal h4 {
  color: #102033 !important;
}

html[data-theme="light"] body #modalAuthRequired .modal p,
html[data-theme="light"] body #modalAuthRequired .legal {
  color: #475569 !important;
}

html[data-theme="light"] body #modalAuthRequired .modal-actions .btn-ghost {
  border-color: rgba(100, 116, 139, 0.28) !important;
  background: #ffffff !important;
  color: #143257 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell,
html[data-theme="light"] body.scanner-ui {
  scrollbar-color: #b7c4d8 #eef3f9;
}

html[data-theme="light"] body.app-shell.scanner-shell::-webkit-scrollbar-track,
html[data-theme="light"] body.scanner-ui::-webkit-scrollbar-track {
  background: #eef3f9;
}

html[data-theme="light"] body.app-shell.scanner-shell::-webkit-scrollbar-thumb,
html[data-theme="light"] body.scanner-ui::-webkit-scrollbar-thumb {
  background: #b7c4d8;
  border-color: #eef3f9;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-search {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-search::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-search:focus {
  border-color: rgba(33, 98, 214, 0.56) !important;
  box-shadow: 0 0 0 3px rgba(33, 98, 214, 0.13) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-item {
  border: 1px solid rgba(148, 163, 184, 0.26) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #102033 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-item:hover {
  border-color: rgba(33, 98, 214, 0.28) !important;
  background: #f1f6ff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-item.is-selected {
  border-color: rgba(33, 98, 214, 0.48) !important;
  background: #eef4ff !important;
  outline-color: rgba(33, 98, 214, 0.62) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-item__title {
  color: #0f4fa8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-item__meta,
  .scanner-item__caret,
  .scanner-panel__subSummary,
  .scanner-matchListStatus,
  .scanner-matchListSortToolbar .summary-toolbar__label,
  .scanner-outcomeStatsEmpty,
  .scanner-resultPeriodTitle,
  .scanner-saveFilterDialog__strategy,
  .scanner-confirmDialog__text
) {
  color: #475569 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .summary-toolbar__label,
  .scanner-row__label,
  .scanner-panel--cards .summary-toolbar__label,
  .scanner-matchWindowLabel
) {
  color: rgba(51, 65, 85, 0.9) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-list,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-panel .scanner-matchList,
html[data-theme="light"] body.app-shell.scanner-shell #root .help-modal__body,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-alertSettingsDialog__body {
  scrollbar-color: #b7c4d8 #edf2f8;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-list::-webkit-scrollbar-track,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-panel .scanner-matchList::-webkit-scrollbar-track,
html[data-theme="light"] body.app-shell.scanner-shell #root .help-modal__body::-webkit-scrollbar-track,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-alertSettingsDialog__body::-webkit-scrollbar-track {
  background: #edf2f8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-list::-webkit-scrollbar-thumb,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-panel .scanner-matchList::-webkit-scrollbar-thumb,
html[data-theme="light"] body.app-shell.scanner-shell #root .help-modal__body::-webkit-scrollbar-thumb,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-alertSettingsDialog__body::-webkit-scrollbar-thumb {
  background: #b7c4d8 !important;
  border-color: #edf2f8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-matchListStatus,
  .scanner-active-strategy,
  .scanner-outcomeStatPnlBreakdown,
  .scanner-branchesPanel,
  .scanner-branchCard,
  .scanner-branchCardPremium,
  .scanner-branchesPanel--library,
  .scanner-alertSwitch,
  .scanner-alertChannelPanel,
  .scanner-alertTelegramPanel,
  .scanner-alertChannelChoice,
  .scanner-alertSettingsDialog__note
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(248, 250, 252, 0.94) !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-active-strategy.is-empty {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(248, 250, 252, 0.94) !important;
  color: #475569 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-active-strategy__label,
  .scanner-active-strategy__branch
) {
  color: #475569 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-active-strategy__name,
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-active-strategy.is-empty .scanner-active-strategy__name {
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-group-title {
  color: #0f4fa8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-group-meta {
  color: #64748b !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-branchTitle,
  .scanner-branchesTitle,
  .scanner-branchCard__outcome,
  .scanner-branchCard__kf,
  .scanner-branchCard__count,
  .scanner-outcomeStatTitle,
  .scanner-outcomeStatBadge,
  .scanner-outcomeStatInlineMeta,
  .scanner-outcomeStatPnlBreakdownTitle,
  .scanner-alertChannelPanel__head strong,
  .scanner-alertChannelChoice strong,
  .scanner-alertSwitch__text,
  .scanner-busyOverlay__title
) {
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-branchStatLabel,
  .scanner-branchMeta,
  .scanner-branchMetaKey,
  .scanner-branchCard__list,
  .scanner-branchCard__empty,
  .scanner-outcomeStatPassLabel,
  .scanner-outcomeStatPnlLabel,
  .scanner-outcomeStatPnlMore,
  .scanner-alertChannelPanel p,
  .scanner-alertChannelChoice small,
  .scanner-alertSettingsDialog__subtitle,
  .scanner-alertSwitch__text small,
  .scanner-alertChannelPanel__service
) {
  color: #64748b !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-panel--cards .seg-btn.summary-toggle:not(.active):not([aria-pressed="true"]),
  .scanner-panel--cards .scanner-matchListToolbar .seg-btn.summary-toggle:not(.active):not([aria-pressed="true"]),
  .scanner-panel--cards .scanner-matchListSortToolbar .seg-btn.summary-toggle:not(.active):not([aria-pressed="true"]),
  .scanner-dateBtn,
  .scanner-matchWindowBtn,
  .scanner-helpBtn,
  .scanner-helpBtn--text,
  .scanner-sortArrow,
  .scanner-branchAlertBtn:not(.is-active)
) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-panel--cards .seg-btn.summary-toggle:not(.active):not([aria-pressed="true"]):hover,
  .scanner-panel--cards .scanner-matchListToolbar .seg-btn.summary-toggle:not(.active):not([aria-pressed="true"]):hover,
  .scanner-panel--cards .scanner-matchListSortToolbar .seg-btn.summary-toggle:not(.active):not([aria-pressed="true"]):hover,
  .scanner-dateBtn:hover,
  .scanner-matchWindowBtn:hover,
  .scanner-helpBtn:hover,
  .scanner-helpBtn--text:hover,
  .scanner-sortArrow:hover,
  .scanner-branchAlertBtn:not(.is-active):hover
) {
  border-color: rgba(33, 98, 214, 0.36) !important;
  background: #eef4ff !important;
  color: #0f2e62 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-matchWindowBtn.active,
  .scanner-branchAlertBtn.is-active
) {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .modal-help-box,
  .metrics-help-card,
  .metrics-help-overviewBlock,
  .metrics-help-miniDef,
  .metrics-help-pctCard,
  .metrics-help-pctCard__table,
  .scanner-timeModeConflictDialog__hint,
  .scanner-confirmDialog__note
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #475569 !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .modal-help-box strong,
  .metrics-help-pctCard__label,
  .metrics-help-pctCard__v,
  .scanner-modalText,
  .scanner-modalTitle
) {
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root :is(
  .scanner-outcomeSelect,
  .scanner-outcomeStatPnlStakeInput,
  .gt-modal .gt-actions button:not(.btn-primary),
  .gt-modal input[type="text"],
  .scanner-num
) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-dropdown,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowDropdown--portal {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #102033 !important;
  box-shadow:
    0 0 0 100vmax rgba(15, 23, 42, 0.18),
    0 18px 40px rgba(15, 23, 42, 0.16) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-dropdown__item,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowDropdown .scanner-dropdown__item,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowCustom .scanner-num,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowUnitTrigger {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-dropdown__item:hover,
html[data-theme="light"] body.scanner-ui .scanner-dropdown__item:focus-visible,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowDropdown .scanner-dropdown__item:hover,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowUnitTrigger:hover {
  border-color: rgba(33, 98, 214, 0.32) !important;
  background: #eef4ff !important;
  color: #0f2e62 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-dropdown__item.is-active,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowDropdown .scanner-dropdown__item.is-active,
html[data-theme="light"] body.scanner-ui .scanner-prematchWindowCustom > .seg-btn:last-child {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-prematchWindowSectionTitle,
  .scanner-prematchWindowClose,
  .scanner-matchSettingsModal .help-modal__close
) {
  color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) :is(
  .scanner-matchCard__cutStamp,
  .scanner-matchCard__strategyCandidate,
  .scanner-matchCard__cutControl,
  .scanner-matchCard__boardHiddenResult
) {
  border-color: rgba(148, 163, 184, 0.26) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #102033 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) :is(
  .scanner-matchCard__cutStampLabel,
  .scanner-matchCard__strategyCandidateLabel,
  .scanner-matchCard__cutControlArrow,
  .scanner-matchCard__cutControlLabel
) {
  color: #2162d6 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) :is(
  .scanner-matchCard__cutStampValue,
  .scanner-matchCard__strategyCandidateText,
  .scanner-matchCard__cutControlDate,
  .scanner-matchCard__cutControlDigit,
  .scanner-matchCard__cutControlColon,
  .scanner-matchCard__boardHiddenResult
) {
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__cutControlArrow:hover {
  background: #eef4ff !important;
  color: #0f2e62 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__strategyCandidate {
  border-color: rgba(217, 119, 6, 0.34) !important;
  background: #fff7ed !important;
  color: #78350f !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__strategyCandidateLabel {
  color: #d97706 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__strategyCandidateText {
  color: #78350f !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-alertSettingsDialog .scanner-modalActions {
  border-top-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(248, 250, 252, 0.96) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-alertSwitch__control {
  border-color: rgba(148, 163, 184, 0.5) !important;
  background: #e2e8f0 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-alertSwitch__control::after {
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-alertSwitch input:checked + .scanner-alertSwitch__control {
  border-color: rgba(4, 120, 87, 0.48) !important;
  background: rgba(4, 120, 87, 0.2) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-alertSwitch input:checked + .scanner-alertSwitch__control::after {
  background: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-titlebar {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(248, 250, 252, 0.98) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-titlebar__text {
  color: #102033 !important;
  font-weight: 900 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-dot {
  opacity: 1 !important;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv th,
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td {
  border-color: rgba(148, 163, 184, 0.34) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv th {
  color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td.kf-open,
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td.kf-close {
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td.hm-up {
  background: rgba(4, 120, 87, 0.08) !important;
  color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td.hm-up-text {
  color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td.hm-down {
  background: rgba(185, 28, 28, 0.08) !important;
  color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchCard__outcomeCard .cards-kv td.hm-down-text {
  color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__dialog,
  .scanner-strategyLibrary__header,
  .scanner-strategyLibrary__toolbar,
  .scanner-strategyLibrary__list,
  .scanner-strategyLibrary__preview,
  .scanner-strategyLibrary__footer,
  .scanner-strategyPanel,
  .scanner-strategyCard,
  .scanner-strategyLibrary__item,
  .scanner-strategyLibrary__empty,
  .scanner-strategyTab,
  .scanner-strategyPill,
  .scanner-strategyCard__ghost,
  .scanner-strategyCard__pill,
  .scanner-strategyTag,
  .scanner-badge
) {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #102033 !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__backdrop {
  background: rgba(15, 23, 42, 0.22) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  backdrop-filter: blur(4px) !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__title,
  .scanner-strategyLibrary__itemName,
  .scanner-strategyTitle,
  .scanner-strategyCard__name,
  .scanner-strategyPill__name,
  .scanner-strategyBar__label,
  .scanner-strategyBar__headMain strong,
  .scanner-branchTitle,
  .scanner-branchesTitle
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__subtitle,
  .scanner-strategyLibrary__itemMeta,
  .scanner-strategyLibrary__itemDesc,
  .scanner-strategyDesc,
  .scanner-strategyBar__hint,
  .scanner-strategyBar__hint--quick,
  .scanner-strategyCard__desc,
  .scanner-strategyCard__label,
  .scanner-strategyTag span,
  .scanner-branchMeta,
  .scanner-branchMetaKey
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__search {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__search::placeholder {
  color: #64748b !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__search:focus {
  border-color: rgba(33, 98, 214, 0.44) !important;
  box-shadow: 0 0 0 3px rgba(33, 98, 214, 0.14) !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__item:hover,
  .scanner-strategyPill:hover,
  .scanner-strategyTab:hover
) {
  border-color: rgba(33, 98, 214, 0.32) !important;
  background: #eef4ff !important;
  color: #0f2e62 !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__item.is-selected,
  .scanner-strategyLibrary__item:focus-visible,
  .scanner-strategyTab.is-active,
  .scanner-strategyPill.active
) {
  border-color: rgba(33, 98, 214, 0.5) !important;
  background: rgba(33, 98, 214, 0.1) !important;
  color: #0f2e62 !important;
  box-shadow: 0 0 0 2px rgba(33, 98, 214, 0.14) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__item.is-active {
  border-color: rgba(4, 120, 87, 0.34) !important;
  background: rgba(4, 120, 87, 0.08) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__star {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-strategyLibrary__star.is-active {
  border-color: rgba(245, 158, 11, 0.44) !important;
  background: rgba(245, 158, 11, 0.12) !important;
  color: #92400e !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-badge--active,
  .scanner-strategyCard__pill:not(.is-empty)
) {
  border-color: rgba(4, 120, 87, 0.28) !important;
  background: rgba(4, 120, 87, 0.08) !important;
  color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-badge--warn,
  .scanner-strategyCard__warn
) {
  border-color: rgba(245, 158, 11, 0.28) !important;
  background: rgba(245, 158, 11, 0.1) !important;
  color: #92400e !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyCard__pill.is-empty,
  .scanner-strategyPill__badge,
  .scanner-strategyTab__close,
  .scanner-strategyPill__remove
) {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(248, 250, 252, 0.94) !important;
  color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__list,
  .scanner-strategyLibrary__preview
) {
  scrollbar-color: #b7c4d8 #edf2f8 !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__list,
  .scanner-strategyLibrary__preview
)::-webkit-scrollbar-track {
  background: #edf2f8 !important;
}

html[data-theme="light"] body.scanner-ui :is(
  .scanner-strategyLibrary__list,
  .scanner-strategyLibrary__preview
)::-webkit-scrollbar-thumb {
  background: #b7c4d8 !important;
  border-color: #edf2f8 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #102033 !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal .help-modal__header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: transparent !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .scanner-matchSettingsModal__title,
  .gt-title,
  .cards-menu__title
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .scanner-matchSettingsModal__hint,
  .summary-toolbar__label,
  .summary-cut__label
) {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .scanner-matchSettingsModal__body,
  .scanner-matchSettingsModal__toolbar,
  .summary-toolbar,
  .summary-toolbar__group,
  .summary-toolbar__buttons,
  .scanner-matchToolbarGroup,
  .scanner-matchToolbarGroup--cutPicker,
  .scanner-matchToolbarGroup--outcomes,
  .scanner-matchToolbarGroup--detail,
  .scanner-matchToolbarGroup--highlight,
  .scanner-matchToolbarGroup--results,
  .scanner-matchToolbarGroup--kf,
  .scanner-matchToolbarGroup--metrics,
  .scanner-matchToolbarGroup--volumes
) {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: transparent !important;
  color: #102033 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .seg-btn,
  .summary-toggle,
  .summary-cut__arrow,
  .help-modal__close,
  .cards-menu__close
) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .seg-btn:hover,
  .summary-toggle:hover,
  .summary-cut__arrow:hover,
  .help-modal__close:hover,
  .cards-menu__close:hover
) {
  border-color: rgba(33, 98, 214, 0.36) !important;
  background: #eef4ff !important;
  color: #0f2e62 !important;
  -webkit-text-fill-color: #0f2e62 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .seg-btn.active,
  .seg-btn[aria-pressed="true"],
  .summary-toggle.active,
  .summary-toggle[aria-pressed="true"]
) {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(33, 98, 214, 0.16) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal :is(
  .summary-cut__box,
  .summary-cut__digit,
  .cards-menu,
  .cards-menu__item
) {
  border-color: rgba(148, 163, 184, 0.26) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal .cards-menu__name {
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-matchSettingsModal .scanner-matchSettingsModal__footer {
  border-top-color: rgba(148, 163, 184, 0.22) !important;
  background: rgba(248, 250, 252, 0.88) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues .scanner-match__pill {
  border-color: rgba(148, 163, 184, 0.38) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #102033 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues .scanner-match__pillKey {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues :is(
  .scanner-match__pillVal,
  .scanner-pill__open,
  .scanner-pill__arrow
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues .scanner-pill__close:not(.is-up):not(.is-down),
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues .scanner-pill__pct:not(.is-up):not(.is-down):not(.empty) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues :is(
  .scanner-pill__close.is-up,
  .scanner-pill__pct.is-up,
  .pct-chip.up
) {
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues :is(
  .scanner-pill__close.is-down,
  .scanner-pill__pct.is-down,
  .pct-chip.down
) {
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-panel--leagues :is(
  .scanner-pill__pct.empty,
  .pct-chip.empty
) {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar {
  border-color: rgba(148, 163, 184, 0.32) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #102033 !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar :is(
  .cal__title,
  .cal__week,
  .cal__week span
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar .cal__week span {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar :is(
  .cal__navBtn,
  .cal__day,
  .cal__link
) {
  border-color: rgba(203, 213, 225, 0.95) !important;
  background: #f8fafc !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar :is(
  .cal__navBtn:hover:not(:disabled),
  .cal__day:hover:not(:disabled),
  .cal__link:hover:not(:disabled)
) {
  border-color: rgba(33, 98, 214, 0.42) !important;
  background: #eef4ff !important;
  color: #0f2e62 !important;
  -webkit-text-fill-color: #0f2e62 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar .cal__day.is-selected {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 4px rgba(33, 98, 214, 0.34),
    0 10px 18px rgba(33, 98, 214, 0.2) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar .cal__day.is-selected:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar .cal__day.is-today:not(.is-selected) {
  border-color: rgba(33, 98, 214, 0.62) !important;
  background: rgba(33, 98, 214, 0.08) !important;
  color: #0f4fa8 !important;
  -webkit-text-fill-color: #0f4fa8 !important;
  box-shadow: inset 0 0 0 1px rgba(33, 98, 214, 0.2) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar .cal__day:is(.is-other, .is-empty),
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendar :is(.cal__navBtn, .cal__day, .cal__link):disabled {
  border-color: rgba(203, 213, 225, 0.6) !important;
  background: #e2e8f0 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 0.74 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-calendarModal .cal__day.is-selected {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 4px rgba(33, 98, 214, 0.3) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-matchStatsBar {
  border-color: rgba(148, 163, 184, 0.26) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatsGrid--strategy .scanner-outcomeStatCard {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: #ffffff !important;
  color: #102033 !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) :is(
  .scanner-matchStatsBar__label,
  .scanner-strategyStatName,
  .scanner-strategyStatKpiValue,
  .scanner-strategyStatPassValue,
  .scanner-strategyStatCalc[open] .scanner-strategyStatCalcSummary,
  .scanner-strategyStatStakeInput
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) :is(
  .scanner-matchStatsBar__hint,
  .scanner-strategyStatMeta,
  .scanner-strategyStatKpiLabel,
  .scanner-strategyStatHistoryLabel,
  .scanner-strategyStatCalcSummary,
  .scanner-strategyStatStakeLabel,
  .scanner-outcomeStatPnlBreakdownTitle,
  .scanner-outcomeStatPnlMore,
  .scanner-outcomeStatsEmpty
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyDisclaimer {
  border: 1px solid rgba(33, 98, 214, 0.18) !important;
  background: rgba(33, 98, 214, 0.08) !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatHero {
  border-bottom-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatKpiValue.is-up,
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatPassFill.is-up + * {
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatKpiValue.is-down {
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatKpiValue.is-zero {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatPassBar {
  background: #e2e8f0 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatPassFill {
  background: #64748b !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatPassFill.is-up {
  background: #10b981 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatPassFill.is-down {
  background: #f87171 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatPassFill.is-zero {
  background: #94a3b8 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) :is(
  .scanner-strategyStatFooter,
  .scanner-strategyStatPresets,
  .scanner-strategyStatStakeBox,
  .scanner-outcomeStatPnlBreakdown
) {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(248, 250, 252, 0.92) !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-statPill {
  border-color: rgba(148, 163, 184, 0.34) !important;
  background: #ffffff !important;
  color: #334155 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-statPill--win {
  border-color: rgba(4, 120, 87, 0.26) !important;
  background: rgba(4, 120, 87, 0.08) !important;
  color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-statPill--lose {
  border-color: rgba(185, 28, 28, 0.24) !important;
  background: rgba(185, 28, 28, 0.08) !important;
  color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-statPill--push {
  border-color: rgba(100, 116, 139, 0.24) !important;
  background: rgba(100, 116, 139, 0.08) !important;
  color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-statPill strong {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStreakItem {
  background: #94a3b8 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStreakItem.is-win {
  background: #10b981 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStreakItem.is-lose {
  background: #ef4444 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStreakItem.is-push {
  background: #94a3b8 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStreakMore {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: #f8fafc !important;
  color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStreakEmpty {
  color: #64748b !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatPnlLine.is-up {
  color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatPnlLine.is-down {
  color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatPnlLine.is-zero {
  color: #64748b !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatPnlStakeInput,
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-strategyStatStakeInput {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatsGrid--strategy .scanner-strategyStatKpiValue.is-up {
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatsGrid--strategy .scanner-strategyStatKpiValue.is-down {
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-outcomeStatsGrid--strategy .scanner-strategyStatKpiValue.is-zero {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchCardPremium {
  border-color: rgba(148, 163, 184, 0.32) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #102033 !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchCardPremium:hover {
  border-color: rgba(33, 98, 214, 0.34) !important;
  background: #ffffff !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchHead {
  border-bottom-color: rgba(148, 163, 184, 0.26) !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchBadgeCount {
  border-color: rgba(33, 98, 214, 0.22) !important;
  background: rgba(33, 98, 214, 0.08) !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchStats,
html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchStats li {
  color: #475569 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchStatLabel {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchStatVal {
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .scanner-branchStatVal.is-neutral {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

html[data-theme="light"] body.scanner-ui :where(#root) .btn-primary.scanner-applyBtn {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog {
  border-color: rgba(148, 163, 184, 0.32) !important;
  background: #ffffff !important;
  color: #102033 !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-modalTitle,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel__head strong,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelChoice strong,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch__text,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch__text strong,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .gt-label {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSettingsDialog__subtitle,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel p,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertTelegramPanel p,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelChoice small,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch__text small,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel__service,
html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSettingsDialog__note {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSettingsDialog__body {
  scrollbar-color: #b7c4d8 #edf2f8 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSettingsDialog__body::-webkit-scrollbar-track {
  background: #edf2f8 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSettingsDialog__body::-webkit-scrollbar-thumb {
  background: #b7c4d8 !important;
  border-color: #edf2f8 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog :is(
  .scanner-alertChannelPanel,
  .scanner-alertTelegramPanel,
  .scanner-alertSwitch,
  .scanner-alertChannelChoice,
  .scanner-alertSettingsDialog__note
) {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog :is(
  .scanner-alertChannelPanel.is-verified,
  .scanner-alertTelegramPanel.is-verified
) {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(248, 250, 252, 0.96) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog :is(
  .scanner-alertChannelPanel.is-verified,
  .scanner-alertTelegramPanel.is-verified
) .scanner-alertChannelPanel__head strong {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel__head span {
  border: 1px solid rgba(33, 98, 214, 0.22) !important;
  background: rgba(33, 98, 214, 0.1) !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog :is(
  .scanner-alertChannelPanel.is-verified,
  .scanner-alertTelegramPanel.is-verified
) .scanner-alertChannelPanel__head span {
  border-color: rgba(4, 120, 87, 0.28) !important;
  background: rgba(4, 120, 87, 0.12) !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel.is-verified > p:first-of-type {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel.is-verified > p:first-of-type::before {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel.is-verified > p:first-of-type::after {
  border-color: rgba(4, 120, 87, 0.28) !important;
  background: rgba(4, 120, 87, 0.12) !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelPanel.is-verified > p:first-of-type b {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertChannelChoice input[type="checkbox"] {
  accent-color: #2162d6;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch__control {
  border-color: rgba(148, 163, 184, 0.5) !important;
  background: #e2e8f0 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch__control::after {
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch input:checked + .scanner-alertSwitch__control {
  border-color: rgba(4, 120, 87, 0.5) !important;
  background: rgba(4, 120, 87, 0.22) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSwitch input:checked + .scanner-alertSwitch__control::after {
  background: #047857 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-alertSettingsDialog__field .gt-input {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog .scanner-modalActions {
  border-top-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(248, 250, 252, 0.98) !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog button:not(.btn-primary):not(.scanner-modalCloseBtn) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.scanner-ui .scanner-alertSettingsDialog button:disabled {
  border-color: #dbe5f1 !important;
  background: #eaf1fb !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) #view-coeff,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .card.card--main {
  border-color: transparent !important;
  background: transparent !important;
  color: #102033 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .chart-panel,
  .chart-panel__chart,
  .volstrip,
  .chart-layout__summary,
  .sumtbl-frame,
  .voltbl-frame,
  .metrics-frame,
  .ohlc,
  .acc-row
) {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #102033 !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .chart-panel__chart,
  .volstrip,
  .chart-layout__summary,
  .sumtbl-frame,
  .voltbl-frame,
  .metrics-frame,
  .ohlc
) {
  background: #f8fbff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-panel__chart .recharts-surface {
  background: transparent !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-cartesian-grid line,
  .recharts-cartesian-grid-horizontal line,
  .recharts-cartesian-grid-vertical line
) {
  stroke: rgba(100, 116, 139, 0.18) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-cartesian-axis-line,
  .recharts-cartesian-axis-tick-line
) {
  stroke: rgba(100, 116, 139, 0.42) !important;
}

/* Bring graph hover tooltips into the light theme. */
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) {
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  color: #102033 !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) :is(
  .tt__time,
  .tt__score,
  .tt__name,
  .tt__val,
  .ttv__name,
  .ttv__v
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) :is(
  .tt__open,
  .tt__ev-time,
  .tt__sep
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) :is(.tt__phase, .tt-chip) {
  background: #f8fbff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) .ttv__block + .ttv__block {
  border-top-color: rgba(148, 163, 184, 0.34) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) .ttv__block.is-active {
  background: rgba(33, 98, 214, 0.08) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) :is(.tt__ev--add .tt__ev-kind, .ttv__k--up) {
  color: var(--up) !important;
  -webkit-text-fill-color: var(--up) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .recharts-tooltip-wrapper .tt,
  .chart-panel__chart .tt,
  .volstrip .tt,
  .tt.tt--vol
) :is(.tt__ev--rem .tt__ev-kind, .ttv__k--down) {
  color: var(--down) !important;
  -webkit-text-fill-color: var(--down) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .chart-layout__summary .summary-toolbar,
  .chart-layout__summary .summary-toolbar__group,
  .chart-layout__summary .summary-toolbar__buttons,
  .chart-layout__summary .seg,
  .sumtbl-wrap,
  .voltbl-wrap,
  .ohlc-wrap,
  .acc-body
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .sumtbl,
  .sumtbl__tr,
  .sumtbl__th,
  .ohlc__head,
  .ohlc__row,
  .ohlc__th,
  .ohlc__td:not(.ohlc__name)
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background-color: transparent !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .sumtbl__td,
  .ohlc__td
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background-color: transparent !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .sumtbl__td:not(.sumtbl__td--name) {
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .sumtbl thead th,
  .sumtbl__head .sumtbl__th,
  .ohlc__head,
  .ohlc__th
) {
  background: #eef4fb !important;
  color: #475569 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .sumtbl__td.is-active-col,
  .sumtbl__th.is-active-col
) {
  background: rgba(33, 98, 214, 0.1) !important;
  box-shadow:
    inset 1px 0 rgba(33, 98, 214, 0.24),
    inset -1px 0 rgba(33, 98, 214, 0.24) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .sumtbl .cell-link,
  .ohlc .cell-link,
  .acc-last,
  .acc-val,
  .acc-metric,
  .arrow
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .chart-layout__summary .summary-toolbar__label,
  .volstrip > div:first-child,
  .time,
  .acc-metric > span:first-child
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .summary-tab:not(.active),
  .summary-toggle:not(.active):not([aria-pressed="true"]),
  .sumtbl-sub-btn
) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) :is(
  .summary-tab.active,
  .summary-tab[aria-pressed="true"],
  .summary-toggle.active,
  .summary-toggle[aria-pressed="true"]
) {
  border-color: #2162d6 !important;
  background: #2162d6 !important;
  color: #ffffff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .acc-chip {
  background: rgba(33, 98, 214, 0.08) !important;
  border-color: rgba(33, 98, 214, 0.22) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .pct-chip:not(.up):not(.down),
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .acc-pct:not(.up):not(.down) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(226, 232, 240, 0.72) !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

/* Make graph summary filter rows feel native in the light theme. */
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .summary-toolbar,
  .summary-toolbar__group,
  .summary-toolbar__buttons,
  .summary-toolbar__group .seg
) {
  border-color: transparent !important;
  background: transparent !important;
  color: #102033 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .summary-toolbar {
  width: 100% !important;
  gap: 8px 12px !important;
  margin-top: 4px !important;
  padding: 0 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .summary-toolbar.summary-toolbar--block {
  margin-top: 8px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .summary-toolbar__group {
  min-height: 34px !important;
  gap: 6px 8px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .summary-toolbar__buttons {
  gap: 6px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .summary-toolbar .summary-toolbar__label {
  min-width: max-content !important;
  color: #52637a !important;
  -webkit-text-fill-color: #52637a !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .summary-tabs {
  margin-bottom: 8px !important;
}

/* Finish the graph volume summary table in the light theme. */
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl-frame {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: #ffffff !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl-wrap {
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  overflow: auto !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl {
  background: #ffffff !important;
  color: #102033 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__head th,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__th {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: #eef4fb !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__th + .voltbl__th,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__td + .voltbl__td {
  border-left-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__tr {
  border-color: rgba(148, 163, 184, 0.18) !important;
  background: #ffffff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__tr:nth-child(even) {
  background: #f8fbff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__tr:hover {
  background: #eef6ff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .voltbl__td,
  .voltbl__value,
  .voltbl-sort-btn
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__td--name .voltbl__label {
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .voltbl__th.is-active-col,
  .voltbl__td.is-active-col
) {
  background: rgba(33, 98, 214, 0.1) !important;
  box-shadow:
    inset 1px 0 rgba(33, 98, 214, 0.22),
    inset -1px 0 rgba(33, 98, 214, 0.22) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__head .voltbl__th.is-active-col {
  background: #e1ecff !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__foot :is(
  th,
  td,
  .voltbl__th,
  .voltbl__td
) {
  border-top-color: rgba(148, 163, 184, 0.32) !important;
  background: #eef4fb !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl__foot :is(
  .voltbl__td.is-active-col,
  .voltbl__th.is-active-col
) {
  background: #e1ecff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl-sort-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 54px !important;
  min-height: 18px !important;
  padding: 2px 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl-sort-arrow {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 0.58 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .voltbl-sort-arrow--active {
  color: #2162d6 !important;
  -webkit-text-fill-color: #2162d6 !important;
  opacity: 1 !important;
}

/* Keep graph summary inner scrollbars aligned with the light theme. */
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
) {
  scrollbar-width: thin !important;
  scrollbar-color: #b7c4d8 #edf2f8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary::-webkit-scrollbar,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
)::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary::-webkit-scrollbar-track,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
)::-webkit-scrollbar-track {
  background: #edf2f8 !important;
  border-radius: 999px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary::-webkit-scrollbar-thumb,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
)::-webkit-scrollbar-thumb {
  background: #b7c4d8 !important;
  border: 2px solid #edf2f8 !important;
  border-radius: 999px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
)::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary::-webkit-scrollbar-corner,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
)::-webkit-scrollbar-corner {
  background: #edf2f8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary::-webkit-scrollbar-button,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .sumtbl-frame,
  .sumtbl-wrap,
  .voltbl-frame,
  .voltbl-wrap,
  .metrics-frame
)::-webkit-scrollbar-button {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: #edf2f8 !important;
}

/* Finish the graph metrics summary cards in the light theme. */
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metrics-frame {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: #f8fbff !important;
  color: #102033 !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
  scrollbar-width: thin !important;
  scrollbar-color: #b7c4d8 #edf2f8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metrics-frame::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metrics-frame::-webkit-scrollbar-track {
  background: #edf2f8 !important;
  border-radius: 999px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metrics-frame::-webkit-scrollbar-thumb {
  background: #b7c4d8 !important;
  border: 2px solid #edf2f8 !important;
  border-radius: 999px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metrics-frame::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metrics-table {
  gap: 10px !important;
  background: transparent !important;
  color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: #ffffff !important;
  color: #102033 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row:hover {
  border-color: rgba(33, 98, 214, 0.38) !important;
  background: #f8fbff !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row.is-active {
  border-color: rgba(16, 185, 129, 0.38) !important;
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.12) inset,
    0 10px 22px rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row.is-res-win::before {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02) 52%, transparent) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row.is-res-lose::before {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.015) 52%, transparent) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .metric-row__top,
  .metric-row__value,
  .metric-val__v
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .metric-row__rank,
  .metric-row__point
) {
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  background: #eef4fb !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__rank {
  background: #e8f1ff !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__label {
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__label[style*="127, 200, 255"] {
  color: #2162d6 !important;
  -webkit-text-fill-color: #2162d6 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__label[style*="230, 210, 122"] {
  color: #a16207 !important;
  -webkit-text-fill-color: #a16207 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__label[style*="229, 154, 109"] {
  color: #c2410c !important;
  -webkit-text-fill-color: #c2410c !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary :is(
  .metric-row__meta,
  .metric-row__meta-item,
  .metric-row__dot,
  .metric-val__k
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__values--multi .metric-val {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: #f8fbff !important;
  color: #102033 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-layout__summary .metric-row__values--multi .metric-val--main {
  border-color: rgba(33, 98, 214, 0.22) !important;
  background: #eef4ff !important;
}

html[data-theme="light"] {
  background: #f4f7fb !important;
  color-scheme: light;
}

html[data-theme="light"] body.app-shell.page-shell.scanner-shell {
  background:
    radial-gradient(circle at 16% 8%, rgba(4, 111, 243, 0.11), transparent 18rem),
    radial-gradient(circle at 84% 10%, rgba(20, 184, 166, 0.07), transparent 18rem),
    linear-gradient(180deg, #fbfdff 0%, #f4f7fb 46%, #eef3f9 100%) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .chart-panel__chart > div[style*="background"] {
  background: #f8fbff !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) {
  border-color: rgba(148, 163, 184, 0.32) !important;
  background: #ffffff !important;
  color: #102033 !important;
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.96) inset !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  padding-bottom: 10px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) :is(
  .out-header h3,
  .out-header__top h3
) {
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) :is(
  .modal-help-toggle,
  .out-header .seg-btn
) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) :is(
  .modal-help-toggle:hover,
  .out-header .seg-btn:hover
) {
  border-color: rgba(33, 98, 214, 0.36) !important;
  background: #f5f9ff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-tabs {
  gap: 8px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-tab {
  min-height: 28px !important;
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-tab:is(
  .active,
  [aria-selected="true"]
) {
  border-color: rgba(33, 98, 214, 0.42) !important;
  background: rgba(33, 98, 214, 0.1) !important;
  color: #174ea6 !important;
  -webkit-text-fill-color: #174ea6 !important;
  box-shadow:
    0 0 0 1px rgba(33, 98, 214, 0.1) inset,
    0 8px 18px rgba(33, 98, 214, 0.08) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-grid {
  gap: 10px !important;
  margin-top: 12px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip {
  min-height: 32px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip:hover {
  border-color: rgba(33, 98, 214, 0.36) !important;
  background: #f8fbff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip:is(
  .is-selected,
  [aria-pressed="true"]
) {
  --out-accent: #2162d6;
  --out-text: #174ea6;
  border-color: color-mix(in srgb, var(--out-accent) 54%, #ffffff) !important;
  background: color-mix(in srgb, var(--out-accent) 13%, #ffffff) !important;
  color: var(--out-text) !important;
  -webkit-text-fill-color: var(--out-text) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--out-accent) 18%, transparent) inset,
    0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-grid--main6 .out-chip:is(
  .is-selected,
  [aria-pressed="true"]
):nth-child(1) {
  --out-accent: #0ea5e9;
  --out-text: #075985;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-grid--main6 .out-chip:is(
  .is-selected,
  [aria-pressed="true"]
):nth-child(2) {
  --out-accent: #d7a817;
  --out-text: #79520a;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-grid--main6 .out-chip:is(
  .is-selected,
  [aria-pressed="true"]
):nth-child(3) {
  --out-accent: #ea7a35;
  --out-text: #9a3412;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) :is(
  .out-picked-counter,
  .out-picked-counter .num
) {
  color: #2162d6 !important;
  -webkit-text-fill-color: #2162d6 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-picked-counter {
  border: 1px solid rgba(33, 98, 214, 0.28) !important;
  background: rgba(33, 98, 214, 0.08) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-picked-counter.full {
  border-color: rgba(33, 98, 214, 0.6) !important;
  background: #2162d6 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) :is(
  .out-picked-counter.full,
  .out-picked-counter.full .num
) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions {
  border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
  padding-top: 12px !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions button:not(.btn-primary) {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #102033 !important;
  -webkit-text-fill-color: #102033 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions button:not(.btn-primary):hover {
  border-color: rgba(33, 98, 214, 0.36) !important;
  background: #f5f9ff !important;
}

/* Keep graph OHLC summaries readable on laptop-width columns. */
@container (min-width: 681px) and (max-width: 920px) {
  .ohlc.ohlc--chart {
    display: block !important;
    --ohlc-chart-cols: minmax(84px, 0.42fr) repeat(4, minmax(118px, 1fr)) !important;
  }

  .ohlc.ohlc--chart .ohlc__head {
    display: grid !important;
    grid-template-columns: var(--ohlc-chart-cols) !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .ohlc.ohlc--chart .ohlc__row {
    display: grid !important;
    grid-template-columns: var(--ohlc-chart-cols) !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border-radius: 0 !important;
    align-items: center !important;
  }

  .ohlc.ohlc--chart .ohlc__row .ohlc__name {
    grid-column: auto !important;
    font-size: var(--fs-sm) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .ohlc.ohlc--chart .ohlc__row .ohlc__td {
    grid-column: auto !important;
    display: flex !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .ohlc.ohlc--chart .ohlc__row .ohlc__td::before {
    content: none !important;
    display: none !important;
  }

  .ohlc.ohlc--chart .ohlc__row .cell-link.full {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (min-width: 1201px) {
  body.app-shell.scanner-shell.scanner-ui {
    overflow: auto !important;
  }

  body.app-shell.scanner-shell.scanner-ui .page-main {
    overflow: visible !important;
  }

  body.scanner-ui :where(#root) .scanner-flex {
    align-items: flex-start !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  body.scanner-ui :where(#root) .scanner-panel--filters,
  body.scanner-ui :where(#root) .scanner-panel--leagues {
    position: relative !important;
    top: auto !important;
    align-self: flex-start !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.scanner-ui :where(#root) .scanner-panel--leagues .scanner-tabBody {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-right: 4px !important;
  }

  body.scanner-ui :where(#root) .scanner-panel--leagues .scanner-list {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  body.scanner-ui :where(#root) .scanner-panel--cards {
    align-self: flex-start !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.scanner-ui :where(#root) .scanner-panel--cards .scanner-matchList {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }
}

/* Outcome picker: make selected outcomes obvious and allow a real reset. */
body.app-shell.scanner-shell :where(#root) .gt-backdrop:has(.out-grid) {
  align-items: center !important;
  padding: 16px !important;
  overflow: auto !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) {
  max-height: calc(100vh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions {
  position: sticky !important;
  bottom: -1px !important;
  z-index: 4 !important;
  margin: 14px -4px -4px !important;
  padding: 12px 4px 4px !important;
  background: linear-gradient(180deg, rgba(24, 39, 62, 0), #18273e 22px, #18273e 100%) !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 34px !important;
  font-weight: 800 !important;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip.is-selected {
  border-color: rgba(96, 165, 250, 0.95) !important;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.86)) !important;
  color: #fff !important;
  box-shadow:
    0 0 0 1px rgba(147, 197, 253, 0.22) inset,
    0 10px 22px rgba(37, 99, 235, 0.24) !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip.is-selected::before {
  content: "" !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 7px !important;
  height: 12px !important;
  margin-right: 1px !important;
  border: solid rgba(255, 255, 255, 0.96) !important;
  border-width: 0 2px 2px 0 !important;
  background: transparent !important;
  transform: rotate(45deg) translateY(-1px) !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip.is-selected:hover {
  border-color: rgba(147, 197, 253, 1) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.98), rgba(37, 99, 235, 0.94)) !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scan-pick__resetBtn {
  border-color: rgba(148, 163, 184, 0.42) !important;
  background: rgba(15, 23, 42, 0.68) !important;
  color: #e2e8f0 !important;
  font-weight: 800 !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scan-pick__resetBtn:not(:disabled):hover {
  border-color: rgba(248, 113, 113, 0.55) !important;
  background: rgba(127, 29, 29, 0.22) !important;
  color: #fecaca !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions button:disabled {
  opacity: 0.52 !important;
  cursor: not-allowed !important;
  border-color: rgba(43, 58, 87, 0.7) !important;
  background: rgba(15, 23, 42, 0.58) !important;
  color: rgba(203, 213, 225, 0.74) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip.is-selected {
  border-color: #2563eb !important;
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.16) inset,
    0 10px 22px rgba(37, 99, 235, 0.18) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 22px, #fff 100%) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scan-pick__resetBtn {
  border-color: #cbd5e1 !important;
  background: #fff !important;
  color: #334155 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scan-pick__resetBtn:not(:disabled):hover {
  border-color: rgba(220, 38, 38, 0.34) !important;
  background: #fff1f2 !important;
  color: #be123c !important;
}

/* Outcome picker: larger text without growing the controls. */
body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-tab,
body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .seg-buttons .seg-btn {
  font-size: 14px !important;
  line-height: 1 !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-chip {
  font-size: 14px !important;
  line-height: 1 !important;
  min-height: 34px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-2col__head,
body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scan-pick__picked > .muted {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scanner-foraTeam__zero {
  margin-bottom: 8px;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scanner-foraTeam__zero .out-2col__head {
  text-align: center;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scanner-foraTeam__signHeads,
body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scanner-foraTeam__signed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scanner-foraTeam__signHeads {
  margin-bottom: 6px;
  color: rgba(229, 242, 255, 0.68);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 640px) {
  body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-2col--fora-teams {
    grid-template-columns: 1fr;
  }
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .scan-pick__pickedChip,
body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-picked-counter {
  font-size: 13px !important;
  line-height: 1 !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .gt-actions button {
  font-size: 14px !important;
  line-height: 1 !important;
}

body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-header h3,
body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-header__top h3 {
  font-size: 18px !important;
  line-height: 1.15 !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow {
  --scanner-outcome-card-gap: 10px;
  gap: var(--scanner-outcome-card-gap) !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow--pairs {
  --scanner-pair-outcome-card-width: clamp(
    220px,
    calc((100% - var(--scanner-outcome-card-gap) - var(--scanner-outcome-card-gap)) / 3),
    320px
  );
  display: grid !important;
  grid-template-columns: repeat(2, var(--scanner-pair-outcome-card-width)) !important;
  justify-content: start !important;
  align-items: start !important;
  justify-items: start !important;
  gap: var(--scanner-outcome-card-gap) !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow--pairs > .scanner-matchCard__outcomeCard {
  width: 100% !important;
  max-width: none !important;
  flex: 0 1 auto !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesLoading {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesLoadingText {
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesEmpty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed rgba(86, 116, 164, 0.68);
  border-radius: 12px;
  background: rgba(15, 29, 52, 0.56);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-sizing: border-box;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesLoadingGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeleton {
  min-height: 184px;
  padding: 10px;
  border: 1px solid rgba(50, 68, 103, 0.88);
  border-radius: 12px;
  background: rgba(15, 29, 52, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonTitle,
body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(56, 76, 110, 0.6);
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonTitle {
  height: 30px;
  margin-bottom: 12px;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine {
  height: 18px;
  margin-top: 8px;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine:nth-child(2n) {
  width: 74%;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine:nth-child(2n + 1) {
  width: 92%;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonTitle::after,
body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.16), transparent);
  animation: scannerOutcomeSkeletonPulse 1.2s ease-in-out infinite;
}

@keyframes scannerOutcomeSkeletonPulse {
  100% {
    transform: translateX(100%);
  }
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesLoadingText {
  color: #2563eb;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesEmpty {
  border-color: rgba(148, 163, 184, 0.62);
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeleton {
  border-color: rgba(148, 163, 184, 0.55);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonTitle,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine {
  background: #e2e8f0;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonTitle::after,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeSkeletonLine::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
}

@media (max-width: 980px) {
  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow--pairs {
    grid-template-columns: repeat(2, var(--scanner-pair-outcome-card-width)) !important;
  }
}

@media (max-width: 900px) {
  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow {
    --scanner-outcome-card-gap: 4px;
  }
}

@media (max-width: 780px) {
  body.app-shell.scanner-shell :where(#root) .scanner-mobileSectionSwitch > .seg-btn {
    min-height: 36px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    letter-spacing: -0.1px;
    white-space: nowrap !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow--pairs {
    --scanner-pair-outcome-card-width: calc((100% - var(--scanner-outcome-card-gap)) / 2);
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--scanner-outcome-card-gap) !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesRow--pairs > .scanner-matchCard__outcomeCard {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    flex: 0 1 auto !important;
  }

  body.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchCard__outcomesRow:not(.scanner-matchCard__outcomesRow--pairs):has(> .scanner-matchCard__outcomeCard:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--scanner-outcome-card-gap) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomeCard .cards-titlebar {
    gap: 5px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-series-trigger {
    position: relative;
    z-index: 1;
    height: 24px !important;
    min-width: 52px !important;
    padding: 0 7px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    touch-action: manipulation;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-series-trigger::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 44px;
    transform: translateY(-50%);
  }
}

@media (max-width: 700px) {
  body.app-shell.scanner-shell :where(#root) .gt-backdrop:has(.out-grid) {
    padding: 10px !important;
  }

  body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) {
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardResultStack,
body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardHiddenResult {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 28px !important;
  text-align: center !important;
  isolation: isolate !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardHiddenText {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 112px !important;
  height: 26px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(96, 165, 250, 0.28) !important;
  background: rgba(15, 23, 42, 0.62) !important;
  color: #bfdbfe !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.28) inset !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardToggleBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: transparent !important;
  color: #dbeafe !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardRevealBtn {
  background: transparent !important;
  border-color: transparent !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardToggleIcon {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex: 0 0 auto !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardToggleBtn:hover,
body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardToggleBtn:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: #fff !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchCard__boardToggleBtn--hide {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #bfdbfe !important;
}

/* scanner-condition-builder */
body.app-shell.scanner-shell :where(#root) .scanner-row--conditionBuilder {
  align-items: flex-start !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(760px, 100%);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #e5f2ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__and {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.34);
  background: rgba(20, 184, 166, 0.13);
  color: #99f6e4;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__count,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calc {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.36);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine {
  flex: 0 1 auto;
  min-width: 0;
  color: rgba(203, 213, 225, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine strong {
  color: #e5f2ff;
  font-weight: 900;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__hint {
  color: rgba(191, 219, 254, 0.82);
  font-size: 12px;
  line-height: 1.35;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item:first-child .scanner-conditionBuilder__card {
  grid-column: 1 / -1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: rgba(13, 148, 136, 0.1);
  color: #99f6e4;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  column-gap: 8px;
  row-gap: 7px;
  align-items: center;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.24);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card.is-anchor {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(13, 148, 136, 0.08);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__outcome {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calc {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(20, 184, 166, 0.12);
  color: #99f6e4;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__rules {
  grid-column: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__rule {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__empty,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__emptyState {
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__remove {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  width: 30px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__remove:hover,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__remove:focus-visible {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(127, 29, 29, 0.3);
  color: #fff;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__add {
  justify-self: start;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(248, 250, 252, 0.92);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__title,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine strong,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__outcome {
  color: #0f172a;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__hint,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine {
  color: #475569;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(241, 245, 249, 0.84);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__rule {
  border-color: rgba(59, 130, 246, 0.16);
  background: rgba(226, 232, 240, 0.7);
  color: #1e40af;
}

@media (max-width: 760px) {
  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine {
    text-align: left;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__join {
    width: 24px;
    min-width: 24px;
    height: 24px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__main {
    flex-wrap: wrap;
  }
}

/* scanner-condition-builder-v2 */
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder {
  max-width: min(720px, 100%);
  gap: 10px;
  padding: 12px;
  border-color: rgba(96, 165, 250, 0.28);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.42), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.38);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__head {
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__title {
  gap: 8px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__count {
  min-height: 24px;
  color: #dbeafe;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.26);
  color: rgba(191, 219, 254, 0.88);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__hint {
  margin-top: -2px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  background: rgba(59, 130, 246, 0.07);
  color: rgba(191, 219, 254, 0.88);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__list {
  gap: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item {
  position: relative;
  display: block;
  min-width: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item + .scanner-conditionBuilder__item {
  margin-top: 14px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item + .scanner-conditionBuilder__item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -14px;
  height: 14px;
  border-left: 1px solid rgba(45, 212, 191, 0.34);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__join {
  position: absolute;
  left: 4px;
  top: -25px;
  z-index: 2;
  width: 26px;
  min-width: 26px;
  height: 24px;
  border-color: rgba(45, 212, 191, 0.38);
  background: #0f2f36;
  color: #99f6e4;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.82);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card {
  grid-template-columns: minmax(120px, max-content) minmax(0, 1fr) 30px;
  column-gap: 10px;
  row-gap: 6px;
  min-height: 48px;
  padding: 8px 8px 8px 10px;
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(5, 12, 28, 0.34);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card.is-anchor {
  border-color: rgba(45, 212, 191, 0.46);
  background:
    linear-gradient(90deg, rgba(13, 148, 136, 0.18), rgba(13, 148, 136, 0.07)),
    rgba(5, 12, 28, 0.28);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__main {
  grid-column: 1;
  grid-row: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__rules {
  grid-column: 2;
  grid-row: 1;
  align-items: center;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__remove {
  grid-column: 3;
  grid-row: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__index {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.28);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__outcome {
  max-width: 220px;
  font-size: 15px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__rule {
  min-height: 24px;
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.82);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__add::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder {
  background: #f8fafc;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__calcLine,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__hint {
  background: rgba(59, 130, 246, 0.06);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__join {
  background: #e0f2fe;
  box-shadow: 0 0 0 4px #f8fafc;
}

@media (max-width: 760px) {
  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder {
    padding: 10px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__rules {
    grid-column: 1;
    grid-row: 2;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__remove {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__outcome {
    max-width: min(220px, 100%);
  }
}

/* scanner-condition-builder-v3 */
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__and,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__join,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item + .scanner-conditionBuilder__item::before {
  display: none !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__title {
  gap: 9px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__list {
  gap: 8px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__item + .scanner-conditionBuilder__item {
  margin-top: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__index {
  width: auto;
  min-width: 82px;
  height: 24px;
  padding: 0 9px;
  white-space: nowrap;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card {
  grid-template-columns: minmax(220px, max-content) minmax(0, 1fr) 30px;
}

/* scanner-condition-builder-edit */
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card:has(> .scanner-conditionBuilder__edit) {
  grid-template-columns: minmax(220px, max-content) minmax(0, 1fr) 36px 36px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card.is-editing {
  border-color: rgba(96, 165, 250, 0.78);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14);
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__remove {
  align-self: center;
  justify-self: end;
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  font-weight: 800;
  line-height: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit {
  grid-column: 3;
  grid-row: 1 / span 2;
  border: 1px solid rgba(96, 165, 250, 0.36);
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  font-size: 18px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit:hover,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit:focus-visible,
body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.78);
  background: rgba(37, 99, 235, 0.32);
  color: #fff;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card:has(> .scanner-conditionBuilder__edit) > .scanner-conditionBuilder__remove {
  grid-column: 4;
  grid-row: 1 / span 2;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__cancelEdit {
  min-height: 32px;
  padding: 6px 11px;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit {
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

@media (max-width: 760px) {
  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card:has(> .scanner-conditionBuilder__edit) {
    grid-template-columns: minmax(0, 1fr) 36px 36px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__edit {
    grid-column: 2;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card:has(> .scanner-conditionBuilder__edit) > .scanner-conditionBuilder__remove {
    grid-column: 3;
  }
}

/* strategy-calendar-weekdays */
body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(59, 66, 86, 0.55);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.42);
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterLabel {
  color: rgba(229, 242, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 28px;
  margin-right: 2px;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn {
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #2b3a57;
  border-radius: 8px;
  background: #101726;
  color: #e5f2ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn.is-active,
body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn[aria-pressed="true"] {
  border-color: #2c64d5;
  background: #2c64d5;
  color: #ffffff;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn.is-off,
body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn[aria-pressed="false"] {
  color: rgba(229, 242, 255, 0.5);
  opacity: 0.72;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn:hover {
  border-color: #3b82f6;
  background: #152033;
  color: #ffffff;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn.is-active:hover,
body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn[aria-pressed="true"]:hover {
  background: #3a78ec;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__day.is-weekday-off {
  border-style: dashed;
  opacity: 0.22;
}

body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__day.is-weekday-off .cal__pnl {
  width: 0 !important;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilters {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterLabel {
  color: rgba(51, 65, 85, 0.82);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #102033;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn.is-active,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn[aria-pressed="true"] {
  border-color: #2162d6;
  background: #2162d6;
  color: #ffffff;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn.is-off,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn[aria-pressed="false"] {
  color: #64748b;
  opacity: 0.7;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn:hover {
  border-color: rgba(33, 98, 214, 0.4);
  background: #eef4ff;
  color: #0f2e62;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn.is-active:hover,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-calendarModal .cal__weekdayFilterBtn[aria-pressed="true"]:hover {
  background: #1d4ed8;
  color: #ffffff;
}

/* match-list-kf-sort */
body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar {
  gap: 7px;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar .summary-toolbar__group {
  gap: 6px;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar .summary-toolbar__buttons {
  gap: 6px;
  align-items: center;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar .summary-toolbar__label {
  font-size: 12px;
  font-weight: 800;
  line-height: 30px;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar .seg-btn.summary-toggle,
body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar .scanner-helpBtn {
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar__kfButton {
  min-width: 48px;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar__metricButton {
  min-width: 72px;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar__kfGroup {
  align-self: stretch;
}

body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls {
  flex-wrap: wrap;
  align-items: center;
}

body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls .scanner-kfSortPoint {
  min-width: 44px;
  justify-content: center;
  border-color: #2b3a57;
  background: #101726;
  color: #e5f2ff;
  box-shadow: none;
}

body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls .scanner-kfSortPoint.active,
body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls .scanner-kfSortPoint[aria-pressed="true"] {
  border-color: #3b82f6;
  background: #13233a;
  color: #e5f2ff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.22);
}

body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  field-sizing: content;
  width: auto;
  min-width: 72px;
  max-width: 140px;
  height: 30px;
  padding: 0 26px 0 10px;
  border: 1px solid #2b3a57;
  background-color: #101726;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23e5f2ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: right 9px center;
  background-repeat: no-repeat;
  background-size: 10px 6px;
  border-radius: 8px;
  color: #e5f2ff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect:hover,
body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect:focus {
  border-color: #3b82f6;
  background-color: #101726;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
  outline: none;
}

body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.app-shell.scanner-shell :where(#root) .scanner-metricSortSelect {
  min-width: 74px;
  max-width: 118px;
}

body.app-shell.scanner-shell :where(#root) .scanner-metricOutcomeSelect {
  min-width: 72px;
  max-width: 140px;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls .scanner-kfSortPoint {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #102033;
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls .scanner-kfSortPoint.active,
html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls .scanner-kfSortPoint[aria-pressed="true"] {
  border-color: #2162d6;
  background: #eef4ff;
  color: #0f2e62;
  box-shadow: inset 0 0 0 1px rgba(33, 98, 214, 0.12);
}

html[data-theme="light"] body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect {
  border-color: #cbd5e1;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23102033' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  color: #102033;
}

@media (min-width: 1201px) {
  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues.is-library-open {
    overflow: visible;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-strategyLibrary {
    position: fixed !important;
    inset: 0 !important;
    z-index: 12000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-strategyLibrary__backdrop {
    background: rgba(2, 6, 23, 0.78) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    backdrop-filter: blur(6px) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-strategyLibrary__dialog {
    width: min(1460px, calc(100vw - 48px)) !important;
    max-width: none !important;
    height: min(900px, calc(100dvh - 48px)) !important;
    max-height: calc(100dvh - 48px) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-strategyLibrary__toolbar {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-strategyLibrary__body {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-strategyLibrary__previewTop {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues .scanner-branchesGrid--library {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  }

  body.scanner-ui.strategy-guide-active {
    --strategy-guide-card-z: 12200;
  }
}

@media (max-width: 760px) {
  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__card {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-conditionBuilder__index {
    min-width: 82px;
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 16px);
    margin-inline: 8px;
    box-sizing: border-box;
    column-gap: 0;
    row-gap: 8px;
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar > .summary-toolbar__group:first-child .summary-toolbar__label,
  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar > .summary-toolbar__group:first-child .summary-toolbar__buttons,
  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__sortDirGroup,
  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__kfGroup,
  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__metricGroup,
  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__statusGroup {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar > .summary-toolbar__group:first-child .summary-toolbar__buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar > .summary-toolbar__group:first-child .summary-toolbar__buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__sortDirGroup {
    grid-row: auto;
    justify-self: stretch;
    align-self: stretch;
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__sortDirGroup .summary-toolbar__buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__sortDirGroup .scanner-sortArrow,
  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__sortDirGroup .scanner-helpBtn {
    width: 100%;
    min-width: 0;
    height: 32px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar__kfGroup {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.app-shell.scanner-shell.scanner-ui :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListSortToolbar__kfGroup {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-kfSortControls {
    width: 100%;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect {
    flex: 1 1 120px;
    max-width: none;
  }
}

/* Prematch scanner SEO intro: keep the H1 connected to the scanner workspace. */
body.app-shell.scanner-shell :where(#root) .page-header:has(.scanner-seo-lead) {
  margin: 0 0 16px;
  padding: 14px 18px 13px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(21, 40, 70, 0.76), rgba(10, 22, 42, 0.9));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.app-shell.scanner-shell :where(#root) .page-header:has(.scanner-seo-lead) .page-title {
  color: #f8fbff;
  font-size: clamp(20px, 1.4vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

body.app-shell.scanner-shell :where(#root) .page-header .scanner-seo-lead {
  max-width: 1540px;
  margin: 6px 0 0;
  color: #b8c8e4;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  body.app-shell.scanner-shell :where(#root) .page-header:has(.scanner-seo-lead) {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  body.app-shell.scanner-shell :where(#root) .page-header:has(.scanner-seo-lead) .page-title {
    font-size: 20px;
  }

  body.app-shell.scanner-shell :where(#root) .page-header .scanner-seo-lead {
    max-width: none;
    font-size: 13px;
    line-height: 1.5;
  }
}

/* Prematch SEO content: wider frame on large desktops, readable text measure. */
@media (min-width: 1440px) {
  body.app-shell.scanner-shell .scanner-seo {
    width: min(100%, 1870px);
  }

  body.app-shell.scanner-shell .scanner-seo__section > p,
  body.app-shell.scanner-shell .scanner-seo__cta > p {
    max-width: 1100px;
  }

  body.app-shell.scanner-shell .scanner-seo__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.app-shell.scanner-shell .scanner-seo__grid > .scanner-seo__card {
    grid-column: span 2;
  }

  body.app-shell.scanner-shell .scanner-seo__grid > .scanner-seo__card:nth-child(4):nth-last-child(2) {
    grid-column: 2 / span 2;
  }

  body.app-shell.scanner-shell .scanner-seo__grid > .scanner-seo__card:nth-child(5):last-child {
    grid-column: 4 / span 2;
  }
}

/* Archive SEO layout: align the intro and content with the scanner workspace. */
body.app-shell.scanner-shell :where(#root) .page-header:has(.archive-seo-lead) {
  margin: 0 0 16px;
  padding: 14px 18px 13px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(21, 40, 70, 0.76), rgba(10, 22, 42, 0.9));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.app-shell.scanner-shell :where(#root) .page-header:has(.archive-seo-lead) .page-title {
  color: #f8fbff;
  font-size: clamp(20px, 1.4vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

body.app-shell.scanner-shell :where(#root) .page-header .archive-seo-lead {
  max-width: 1540px;
  margin: 6px 0 0;
  color: #b8c8e4;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  body.app-shell.scanner-shell :where(#root) .page-header:has(.archive-seo-lead) {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  body.app-shell.scanner-shell :where(#root) .page-header:has(.archive-seo-lead) .page-title {
    font-size: 20px;
  }

  body.app-shell.scanner-shell :where(#root) .page-header .archive-seo-lead {
    max-width: none;
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (min-width: 1440px) {
  body.app-shell.scanner-shell .archive-seo {
    width: min(100%, 1870px);
  }

  body.app-shell.scanner-shell .archive-seo__section > p,
  body.app-shell.scanner-shell .archive-seo__cta > p {
    max-width: 1100px;
  }

  body.app-shell.scanner-shell .archive-seo__grid,
  body.app-shell.scanner-shell .archive-seo__steps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.app-shell.scanner-shell .archive-seo__grid > .archive-seo__card,
  body.app-shell.scanner-shell .archive-seo__steps > .archive-seo__step {
    grid-column: span 2;
  }

  body.app-shell.scanner-shell .archive-seo__steps > .archive-seo__step:nth-child(4):nth-last-child(2) {
    grid-column: 2 / span 2;
  }

  body.app-shell.scanner-shell .archive-seo__steps > .archive-seo__step:nth-child(5):last-child {
    grid-column: 4 / span 2;
  }
}

/* Five equal cards fit comfortably in one row on wide desktop screens. */
@media (min-width: 1700px) {
  body.app-shell.scanner-shell .scanner-seo__grid,
  body.app-shell.scanner-shell .archive-seo__steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.app-shell.scanner-shell .scanner-seo__grid > .scanner-seo__card,
  body.app-shell.scanner-shell .scanner-seo__grid > .scanner-seo__card:nth-child(4):nth-last-child(2),
  body.app-shell.scanner-shell .scanner-seo__grid > .scanner-seo__card:nth-child(5):last-child,
  body.app-shell.scanner-shell .archive-seo__steps > .archive-seo__step,
  body.app-shell.scanner-shell .archive-seo__steps > .archive-seo__step:nth-child(4):nth-last-child(2),
  body.app-shell.scanner-shell .archive-seo__steps > .archive-seo__step:nth-child(5):last-child {
    grid-column: auto;
  }
}

/* Outcome statistics: keep identity, sample size and match rate on stable rows. */
body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatCard__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    gap: 7px;
    width: 100%;
    min-width: 0;
  }

body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatCard__titles {
    display: block;
    width: 100%;
    min-width: 0;
  }

body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatCard__titleRow {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatInlineMeta {
    justify-self: end;
    margin-left: 0;
  }

body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatCard__pass {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    text-align: left;
  }

body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatPassLabel {
    min-width: 0;
    line-height: 1.2;
    white-space: normal;
  }

body.app-shell.scanner-shell :where(#root) .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) .scanner-outcomeStatPassValue {
    flex: 0 0 auto;
    line-height: 1;
  }

/* Keep the three mobile outcome cards readable without letting pills bleed into neighbours. */
@media (max-width: 767px) {
  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-outcomeStatCard:not(.scanner-outcomeStatCard--strategy) {
    min-width: 0;
    overflow: hidden;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-outcomeStatChips {
    width: 100%;
    min-width: 0;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-statPill {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-statPill strong {
    flex: 0 0 auto;
    font-size: 11px;
  }
}

/* Lift the indicators picker out of the scrollport so its header and close action stay visible. */
@media (max-width: 767px) {
  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu {
    position: fixed !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(320px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    transform: translateX(-50%) !important;
    z-index: 2000 !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu__head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: inherit;
  }
}

/* Keep long help dialogs inside the currently visible mobile viewport. */
@media (max-width: 767px) {
  body.app-shell.scanner-shell :where(#root) .gt-modal.help-modal {
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
  }
}

/* Increase high-frequency mobile controls without turning the dense scanner into a tablet layout. */
@media (max-width: 767px) and (pointer: coarse) {
  body.app-shell.scanner-shell :where(#root) .scanner-mobileSectionSwitch > .seg-btn,
  body.app-shell.scanner-shell :where(#root) #tour-match-mode > .seg-btn {
    min-height: 44px !important;
    font-size: 13px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-helpBtn {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(
    .scanner-iconBtn,
    .scanner-star,
    .seg-btn--nav
  ) {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(
    .scanner-dateBtn,
    .scanner-matchWindowBtn
  ) {
    min-height: 44px !important;
    font-size: 13px !important;
  }

  body.app-shell.scanner-shell :where(#root) #tour-filters-day.scanner-row {
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
  }

  body.app-shell.scanner-shell :where(#root) #tour-filters-day > .scanner-row__label {
    flex: 0 0 var(--scanner-filter-label-min-width);
    min-width: 0;
  }

  body.app-shell.scanner-shell :where(#root) #tour-filters-day > .scanner-row__btns {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
  }

  body.app-shell.scanner-shell :where(#root) #tour-filters-day :is(
    .scanner-dateWrap,
    .scanner-dateBtn
  ) {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.app-shell.scanner-shell :where(#root) #tour-filters-day .scanner-calendar {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(260px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate(-50%, -50%);
    z-index: 2000;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchToolbarGroup--mobileDate {
    grid-template-columns: auto minmax(0, 1fr) 44px 44px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-search {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(
    .scanner-row__label,
    .summary-toolbar__label,
    .scanner-matchWindowLabel
  ) {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel :is(
    .scanner-row__btns > .seg-btn,
    .scanner-applyRow > .btn-primary,
    .summary-toggle
  ) {
    min-height: 36px !important;
  }

  /* The icon buttons are 44px touch targets, so their grid tracks must match. */
  body.app-shell.scanner-shell :where(#root) .scanner-strategyBar__headActions {
    grid-template-columns: minmax(0, 1fr) 44px !important;
    column-gap: 6px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-branchActions {
    grid-template-columns: minmax(0, 1fr) 44px 44px !important;
    column-gap: 6px !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(
    .scanner-outcomeDialog .scanner-modalCloseBtn,
    .gt-modal.help-modal .help-modal__close
  ) {
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    font-size: 20px !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .summary-toggle {
    min-height: 36px !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal__footer .seg-btn {
    min-height: 44px !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu__close {
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 40px;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 999px;
    font-size: 20px !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu__item {
    min-height: 40px;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu__checkbox {
    width: 20px;
    height: 20px;
  }

  body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) :is(
    .out-tab,
    .seg-buttons .seg-btn,
    .out-chip,
    .gt-actions button
  ) {
    min-height: 40px !important;
  }

  body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-header button,
  body.app-shell.scanner-shell :where(#root) .gt-modal:has(.out-grid) .out-header__top button {
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

/* Keep the dense match-card toolbar compact on every narrow viewport.
   The pseudo-element preserves a comfortable touch area without enlarging the visible buttons. */
@media (max-width: 767px) {
  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesTools,
  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesActions {
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesTools .scanner-iconBtn {
    position: relative;
    height: 36px !important;
    min-height: 36px !important;
    touch-action: manipulation;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesTools .scanner-iconBtn:not(.scanner-iconBtn--wide) {
    width: 36px !important;
    min-width: 36px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesTools .scanner-standings-trigger,
  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesTools .sportdan-ai-analysis-button {
    height: 36px !important;
    min-height: 36px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchCard__outcomesTools .scanner-iconBtn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(44px, 100%);
    height: 44px;
    transform: translate(-50%, -50%);
  }
}

/* Keep standalone current-score labels readable. */
body.app-shell.scanner-shell :where(#root) .scanner-currentScoreLabels .summary-toolbar__buttons {
  width: 100% !important;
  min-width: 0 !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
}

body.app-shell.scanner-shell :where(#root) .scanner-currentScoreLabels .summary-toggle {
  flex: 1 1 170px;
  min-width: 0 !important;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.25 !important;
  text-align: center;
}

/* Desktop match toolbar: keep status controls compact like the other toggles. */
@media (min-width: 768px) {
  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchToolbarGrid:not(.scanner-matchSettingsModal__toolbar) {
    grid-template-columns: max-content max-content !important;
    justify-content: start !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchToolbarGrid:not(.scanner-matchSettingsModal__toolbar) > :is(
    .scanner-matchToolbarGroup--highlight,
    .scanner-matchToolbarGroup--results
  ) {
    display: flex !important;
    grid-column: auto !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchToolbarGrid:not(.scanner-matchSettingsModal__toolbar) > :is(
    .scanner-matchToolbarGroup--highlight,
    .scanner-matchToolbarGroup--results
  ) > .summary-toolbar__buttons {
    display: flex !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchToolbarGrid:not(.scanner-matchSettingsModal__toolbar) > :is(
    .scanner-matchToolbarGroup--highlight,
    .scanner-matchToolbarGroup--results
  ) .summary-toggle {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    text-align: center;
  }
}

/* Match-view labels fit the widest label ("Команда форы:", 88.7px) with a 10px gap. */
@media (min-width: 901px) {
  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchListToolbar > .summary-toolbar__group.scanner-matchToolbarGroup,
  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchListSortToolbar > .summary-toolbar__group:first-child {
    gap: 10px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchListToolbar > .summary-toolbar__group.scanner-matchToolbarGroup > .summary-toolbar__label,
  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchListSortToolbar > .summary-toolbar__group:first-child > .summary-toolbar__label {
    flex: 0 0 89px !important;
    width: 89px !important;
    min-width: 89px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchListToolbar > #tour-match-cut {
    gap: 6px !important;
    padding-left: 10px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards .scanner-matchListToolbar > #tour-match-cut > .summary-toolbar__label {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards #tour-match-day .scanner-matchWindowControl {
    gap: 6px;
    padding-left: 10px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--cards #tour-match-day .scanner-matchWindowLabel {
    flex: 0 0 auto;
    width: auto;
  }
}

/* Championship controls line up after the widest label ("Группировать:", 81.2px). */
@media (min-width: 901px) {
  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues:has(#tour-leagues-day) .scanner-row > .scanner-row__label {
    flex: 0 0 82px;
    width: 82px;
    min-width: 82px;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-panel--leagues #tour-leagues-favorites {
    margin-bottom: 12px;
  }
}

body.app-shell.scanner-shell :where(#root) :is(
  .scanner-matchStatsBar__label,
  .scanner-historicalMetricsTitle,
  .scanner-strategyDisclaimer,
  .scanner-calendarModal__note
) {
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.app-shell.scanner-shell :where(#root) .scanner-historicalMetricsTitle {
  margin: 12px 0 0;
  color: #e5f2ff;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 800;
  line-height: 1.35;
}

/* Mobile match settings: place each heading above its controls. */
@media (max-width: 767px) {
  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListToolbar > .summary-toolbar__group.scanner-matchToolbarGroup:not(.scanner-matchToolbarGroup--cutPicker) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 6px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListToolbar > .summary-toolbar__group.scanner-matchToolbarGroup:not(.scanner-matchToolbarGroup--cutPicker) > .summary-toolbar__label {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding-left: 6px !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .scanner-matchListToolbar > .summary-toolbar__group.scanner-matchToolbarGroup:not(.scanner-matchToolbarGroup--cutPicker) > .summary-toolbar__buttons {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards #tour-match-day.scanner-matchToolbarGroup--mobileDate {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards #tour-match-day .scanner-matchDateControls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px 44px !important;
    gap: 6px !important;
    width: 100% !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards #tour-match-day .scanner-dateWrap {
    grid-column: auto !important;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards #tour-match-day .scanner-matchWindowControl {
    display: grid !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    row-gap: 6px !important;
    padding-left: 6px !important;
  }
}

/* Scanner outcome validation: light theme */
html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-outcomeValidation.is-invalid {
  border-color: rgba(220, 38, 38, 0.78) !important;
  background: rgba(254, 242, 242, 0.98) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12) !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-outcomeValidation.is-invalid .scanner-row__label {
  color: #b91c1c !important;
}

html[data-theme="light"] body.app-shell.scanner-shell #root .scanner-outcomeValidation__error {
  color: #991b1b !important;
}

/* Mobile match view: keep overlays inside the visual viewport and normalize touch targets. */
@media (max-width: 767px) {
  body.app-shell.scanner-shell :where(#root) :is(#tour-leagues-day, #tour-filters-day, #tour-match-day) .scanner-calendar {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(348px, calc(100vw - 12px)) !important;
    max-width: calc(100vw - 12px) !important;
    max-height: calc(100vh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    transform: translate(-50%, -50%) !important;
    z-index: 2000 !important;
  }

  body.app-shell.scanner-shell .gt-backdrop:has(.scanner-matchSettingsModal) {
    box-sizing: border-box;
    align-items: center !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal {
    box-sizing: border-box !important;
    width: min(860px, 100%) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .help-modal__header > div {
    min-width: 0;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .help-modal__close {
    display: inline-grid !important;
    position: static !important;
    place-items: center;
    flex: 0 0 44px;
    align-self: flex-start;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    font-size: 20px !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal__title {
    overflow-wrap: anywhere;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal__body {
    min-height: 0;
    overscroll-behavior: contain;
  }
}

@media (max-width: 767px) and (pointer: coarse) {
  body.app-shell.scanner-shell :where(#root) .scanner-flex--mobileSections .scanner-panel--cards .summary-toolbar .seg-btn.summary-toggle,
  body.app-shell.scanner-shell .scanner-matchSettingsModal .summary-toggle,
  body.app-shell.scanner-shell :where(#root) .scanner-kfSortSelect,
  body.app-shell.scanner-shell :where(#root) .scanner-strategyCalendarBtn {
    min-height: 44px !important;
    touch-action: manipulation;
  }

  body.app-shell.scanner-shell :where(#root) .scanner-matchListSortToolbar__sortDirGroup :is(
    .scanner-sortArrow,
    .scanner-helpBtn
  ) {
    height: 44px !important;
    min-height: 44px !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(#tour-leagues-day, #tour-filters-day, #tour-match-day) .scanner-calendar :is(
    .cal__navBtn,
    .cal__link
  ) {
    min-height: 44px !important;
    touch-action: manipulation;
  }

  body.app-shell.scanner-shell :where(#root) :is(#tour-leagues-day, #tour-filters-day, #tour-match-day) .scanner-calendar .cal__navBtn {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(#tour-leagues-day, #tour-filters-day, #tour-match-day) .scanner-calendar :is(
    .cal__grid,
    .cal__weekdays
  ) {
    gap: 3px !important;
  }

  body.app-shell.scanner-shell :where(#root) :is(#tour-leagues-day, #tour-filters-day, #tour-match-day) .scanner-calendar .cal__day {
    min-height: 44px !important;
    touch-action: manipulation;
  }

  body.app-shell.scanner-shell :where(#root) :is(#tour-leagues-day, #tour-filters-day, #tour-match-day) .scanner-calendar .cal__link {
    display: inline-flex;
    align-items: center;
    padding-block: 8px;
  }

  body.app-shell.scanner-shell .scanner-prematchWindowClose {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  body.app-shell.scanner-shell .scanner-prematchWindowDropdown .scanner-dropdown__item,
  body.app-shell.scanner-shell .scanner-prematchWindowCustom .seg-btn,
  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu__item {
    min-height: 44px !important;
  }

  body.app-shell.scanner-shell .scanner-matchSettingsModal .cards-menu__close {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}
