:root {
  --calc-chart: #17182c;
  --calc-workspace: #3a4251;
  --calc-card: #465162;
  --calc-card-soft: #505c6d;
  --calc-input: #303847;
  --calc-omission: #414c5b;
  --calc-result: #3c4b5c;
  --calc-search: #49566a;
  --calc-rail: #3d4756;
  --calc-border: #69788c;
  --calc-primary: #657fa5;
  --calc-button: #536177;
  --calc-button-hover: #617089;
  --calc-button-muted: #4b586d;
  --calc-matrix: #4a5869;
  --calc-header: #465365;
  --calc-summary: #515d6e;
  --calc-summary-border: #758397;
  --calc-summary-text: #edf1f5;
  --calc-text: #edf0f5;
  --calc-muted: #bac3d0;
}

/* All calculator surfaces stay neutral blue-grey; group hues belong only to lottery switches. */

.indicator-drawer.is-realtime-number-tool,
.calculator-detail,
.mobile-set-panel,
.mobile-calc-builder,
.mobile-calc-workbench,
.mobile-lotto-builder,
.desktop-unified-lottery-calculator,
.desktop-digit-analysis-workspace {
  background: var(--calc-workspace) !important;
  color: var(--calc-text) !important;
}

.mobile-calc-results,
.mobile-lotto-results,
.indicator-results-panel,
.set-calculator-results,
.kl8-rotation-results {
  border-color: var(--calc-border) !important;
  background: var(--calc-result) !important;
  color: var(--calc-text) !important;
}

.mobile-digit-omission-panel,
.lotto-n-out-n-panel,
.historical-omission-panel,
.set-calculator-omission-panel {
  border-color: var(--calc-border) !important;
  background: var(--calc-omission) !important;
  color: var(--calc-text) !important;
}

.dan-custom-search-panel,
.calculator-detail > .dan-custom-search-panel,
.desktop-digit-analysis-workspace .dan-custom-search-panel.is-digit-search {
  border-color: #56576f !important;
  background: var(--calc-search) !important;
  color: var(--calc-text) !important;
}

.indicator-list-rail,
.indicator-list-rail .set-calculator-condition-panel,
.indicator-list-rail .indicator-workbench__conditions,
.set-calculator-condition-panel {
  border-color: var(--calc-border) !important;
  background: var(--calc-rail) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool textarea,
.indicator-drawer.is-realtime-number-tool input:not([type="color"]),
.indicator-drawer.is-realtime-number-tool select,
.calculator-detail textarea,
.calculator-detail input:not([type="color"]),
.calculator-detail select,
.mobile-set-panel textarea,
.mobile-set-panel input:not([type="color"]),
.mobile-set-panel select {
  border-color: #526075 !important;
  background: var(--calc-input) !important;
  color: #edf1f7 !important;
}

.indicator-drawer.is-realtime-number-tool textarea::placeholder,
.calculator-detail textarea::placeholder,
.mobile-set-panel textarea::placeholder {
  color: #8e9aab !important;
}

.indicator-drawer.is-realtime-number-tool .tool-button,
.calculator-detail .tool-button,
.mobile-set-panel button:not(.mobile-lotto-ball):not(.mobile-calc-choice) {
  border-color: #5c6b7f !important;
  background: var(--calc-button) !important;
  color: #f1f4f8 !important;
}

/* V101: the chart is always the deepest surface; calculators use calm nearby layers. */
.indicator-drawer.is-realtime-number-tool > .indicator-drawer__forms,
.indicator-drawer.is-realtime-number-tool > .indicator-config,
.indicator-drawer.is-realtime-number-tool > .indicator-drawer__body,
.indicator-drawer.is-realtime-number-tool #indicatorConfig,
.indicator-drawer.is-realtime-number-tool #indicatorDrawerBody {
  border-color: var(--calc-border) !important;
  background: var(--calc-card-soft) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool .indicator-workbench,
.indicator-drawer.is-realtime-number-tool .indicator-workbench__conditions,
.indicator-drawer.is-realtime-number-tool .indicator-condition-list,
.indicator-drawer.is-realtime-number-tool .set-calculator-workbench,
.indicator-drawer.is-realtime-number-tool .set-calculator-condition-list,
.indicator-drawer.is-realtime-number-tool .desktop-lotto-compact-editor,
.indicator-drawer.is-realtime-number-tool .desktop-lotto-condition-row,
.indicator-drawer.is-realtime-number-tool .desktop-lotto-condition-rows {
  border-color: var(--calc-border) !important;
  background: var(--calc-card) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .desktop-dan-search-host,
  .indicator-condition-rail,
  .indicator-workbench__conditions,
  .indicator-condition-list,
  .historical-omission-controls,
  .historical-omission-controls--digit
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-card) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .indicator-series-button,
  .dan-custom-search-actions button,
  .historical-omission-controls button
):not(.is-primary):not([aria-pressed="true"]) {
  border-color: var(--calc-border) !important;
  background: var(--calc-button) !important;
  color: var(--calc-text) !important;
  box-shadow: none !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .indicator-series-button[aria-pressed="true"],
  .indicator-series-button.is-active,
  button.is-primary,
  .desktop-lotto-add,
  .set-calculator-calculate,
  .historical-omission-search-button
):not(.desktop-lotto-number):not(.set-calculator-dan-button):not(.kl8-rotation-number):not(.lotto-rotation-number) {
  border-color: var(--calc-primary) !important;
  background: var(--calc-primary) !important;
  color: #f7f7f1 !important;
}

#indicatorDrawer:has(#starButtons [data-lottery-switch="fc3d"].is-current-lottery) #starButtons [data-lottery-switch="fc3d"],
#indicatorDrawer:has(#starButtons [data-lottery-switch="fc3d"][aria-pressed="true"]) #starButtons [data-lottery-switch="fc3d"],
#indicatorDrawer[data-desktop-unified-calculator="ssq"] #starButtons [data-lottery-switch="ssq"],
#indicatorDrawer[data-desktop-unified-calculator="kl8"] #starButtons [data-lottery-switch="kl8"] {
  border-color: #aa9347 !important;
  background: #806f35 !important;
  color: #fff7d0 !important;
}

#indicatorDrawer:has(#starButtons [data-lottery-switch="pl3"].is-current-lottery) #starButtons [data-lottery-switch="pl3"],
#indicatorDrawer:has(#starButtons [data-lottery-switch="pl3"][aria-pressed="true"]) #starButtons [data-lottery-switch="pl3"],
#indicatorDrawer:has(#starButtons [data-lottery-switch="5"].is-current-lottery) #starButtons [data-lottery-switch="5"],
#indicatorDrawer:has(#starButtons [data-lottery-switch="5"][aria-pressed="true"]) #starButtons [data-lottery-switch="5"],
#indicatorDrawer[data-desktop-unified-calculator="dlt"] #starButtons [data-lottery-switch="dlt"] {
  border-color: #61927a !important;
  background: #46735d !important;
  color: #e8fff3 !important;
}

#screen-calculator-3d .mobile-calculator-game-strip button[aria-pressed="true"],
#screen-calculator-ssq .mobile-calculator-game-strip button[aria-pressed="true"],
#screen-calculator-kl8 .mobile-calculator-game-strip button[aria-pressed="true"] {
  border-color: #aa9347 !important;
  background: #806f35 !important;
  color: #fff7d0 !important;
}

#screen-calculator-pl3 .mobile-calculator-game-strip button[aria-pressed="true"],
#screen-calculator-pl5 .mobile-calculator-game-strip button[aria-pressed="true"],
#screen-calculator-dlt .mobile-calculator-game-strip button[aria-pressed="true"] {
  border-color: #61927a !important;
  background: #46735d !important;
  color: #e8fff3 !important;
}

#indicatorDrawer.is-realtime-number-tool #indicatorConditionRail > .indicator-workbench__conditions,
#indicatorDrawer.is-realtime-number-tool #indicatorConditionRail > .indicator-workbench__conditions > .indicator-condition-list,
#indicatorDrawer.is-realtime-number-tool #indicatorConditionRail .indicator-condition-list {
  border-color: var(--calc-border) !important;
  background: var(--calc-card) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .indicator-workbench__header,
  .indicator-results__header,
  .historical-omission-panel__header,
  .set-calculator-results__header,
  .set-calculator-condition-panel__header,
  .mobile-lotto-results > header,
  .lotto-n-out-n-panel > header
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-card-soft) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .indicator-workbench__header,
  .indicator-results__header,
  .historical-omission-panel__header,
  .set-calculator-results__header,
  .set-calculator-condition-panel__header,
  .mobile-lotto-results > header,
  .lotto-n-out-n-panel > header
) :is(strong, span, output) {
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .indicator-result-numbers,
  .historical-omission-result,
  .set-calculator-output,
  .mobile-lotto-result-output,
  .mobile-lotto-results.is-empty > p
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-input) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .set-calculator-header,
  .set-calculator-mode-tabs,
  .set-calculator-dan-panel,
  .set-calculator-controls,
  .desktop-lotto-number-picker,
  .desktop-lotto-number-grid
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-card-soft) !important;
  color: var(--calc-text) !important;
}

.indicator-drawer.is-realtime-number-tool .desktop-lotto-number-picker > summary,
.indicator-drawer.is-realtime-number-tool .desktop-lotto-zone-label,
.indicator-drawer.is-realtime-number-tool .desktop-lotto-editor-status,
.indicator-drawer.is-realtime-number-tool .desktop-lotto-result-summary {
  color: var(--calc-muted) !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .set-calculator-mode-tab,
  .set-calculator-dan-button,
  .desktop-lotto-count,
  .desktop-lotto-condition-row button,
  .desktop-lotto-compact-editor > footer button
):not([aria-pressed="true"]):not(.is-selected):not(.is-primary) {
  border-color: #5c6b7f !important;
  background: var(--calc-button) !important;
  color: #e8edf4 !important;
  box-shadow: none !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .set-calculator-mode-tab,
  .set-calculator-dan-button,
  .desktop-lotto-count,
  .desktop-lotto-condition-row button,
  .desktop-lotto-compact-editor > footer button
)[aria-disabled="true"],
.indicator-drawer.is-realtime-number-tool :is(button, .tool-button):disabled {
  border-color: #596579 !important;
  background: var(--calc-button-muted) !important;
  color: #9ca8b9 !important;
  opacity: .76 !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .desktop-lotto-number.number-temperature-hot,
  .desktop-lotto-number.number-temperature-warm,
  .desktop-lotto-number.number-temperature-cold,
  .set-calculator-dan-button.number-temperature-hot,
  .set-calculator-dan-button.number-temperature-warm,
  .set-calculator-dan-button.number-temperature-cold,
  .kl8-rotation-number.number-temperature-hot,
  .kl8-rotation-number.number-temperature-warm,
  .kl8-rotation-number.number-temperature-cold,
  .lotto-rotation-number.number-temperature-hot,
  .lotto-rotation-number.number-temperature-warm,
  .lotto-rotation-number.number-temperature-cold
) {
  transition: border-color .08s linear, background-color .08s linear, color .08s linear !important;
}

.indicator-drawer.is-realtime-number-tool :is(
  .desktop-unified-lottery-calculator,
  .desktop-unified-lottery-panel,
  .desktop-lotto-compact-editor,
  .desktop-lotto-condition-row,
  .desktop-lotto-number-picker,
  .desktop-lotto-number-grid,
  .kl8-rotation-matrix,
  .lotto-rotation-matrix,
  .indicator-list-rail,
  .mobile-lotto-results,
  .lotto-n-out-n-panel,
  .dan-custom-search-panel
) {
  transition: none !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator :is(
  #kl8RotationMatrix,
  .kl8-rotation-matrix,
  #lottoRotationMatrix,
  .lotto-rotation-matrix
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-matrix) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator :is(
  .kl8-rotation-settings,
  .lotto-rotation-zone,
  .kl8-rotation-workbench,
  .kl8-rotation-results,
  .kl8-rotation-output,
  .kl8-rotation-verification
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-result) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .kl8-rotation-results__header {
  border-color: var(--calc-border) !important;
  background: var(--calc-header) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .lotto-rotation-zone__pick output {
  border-color: #526075 !important;
  background: var(--calc-input) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator :is(
  .lotto-rotation-total,
  .lotto-rotation-zone__summary,
  .kl8-rotation-summary
) {
  border-color: var(--calc-summary-border) !important;
  background: var(--calc-summary) !important;
  color: var(--calc-summary-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator[data-desktop-unified-calculator="kl8"] .desktop-lotto-compact-editor .desktop-lotto-number-picker,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator[data-desktop-unified-calculator="kl8"] .desktop-lotto-compact-editor .desktop-lotto-number-grid {
  border-color: var(--calc-border) !important;
  background: var(--calc-card-soft) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator[data-desktop-unified-calculator="kl8"] .mobile-lotto-results.is-empty > p,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator[data-desktop-unified-calculator="kl8"] .mobile-lotto-result-output {
  border-color: var(--calc-border) !important;
  background: var(--calc-input) !important;
  color: var(--calc-muted) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator > #indicatorListRail,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator > #indicatorListRail > #setCalculatorConditionPanel,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator > #indicatorListRail #setCalculatorConditions {
  border-color: var(--calc-border) !important;
  background: var(--calc-rail) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-lotto-play-slot {
  border-color: var(--calc-border) !important;
  background: var(--calc-card-soft) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool :is(
  #setCalculatorClear,
  .indicator-clear-button,
  .desktop-lotto-compact-editor > footer button:not(.is-primary),
  .mobile-lotto-result-actions > button:not(.is-primary),
  .dan-custom-search-panel button:not(.is-primary)
) {
  border-color: #5c6b7f !important;
  background: var(--calc-button-muted) !important;
  color: #e4e9f2 !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool :is(
  .desktop-lotto-inline-modes button:not([aria-pressed="true"]),
  .desktop-kl8-hit-verifier__controls button:not(.is-primary)
) {
  border-color: #5c6b7f !important;
  background: var(--calc-button) !important;
  color: #e4e9f2 !important;
}

.calculator-detail :is(
  .mobile-calc-builder,
  .mobile-calc-workbench,
  .mobile-lotto-builder,
  .mobile-lotto-results,
  .mobile-digit-omission-panel,
  .lotto-n-out-n-panel,
  .dan-custom-search-panel,
  .set-calculator-condition-panel,
  .set-calculator-condition-list,
  .kl8-rotation-matrix,
  .lotto-rotation-matrix,
  .kl8-rotation-workbench,
  .kl8-rotation-results,
  .kl8-rotation-output,
  .lotto-rotation-zone
),
.mobile-set-panel :is(
  .mobile-calc-builder,
  .mobile-calc-workbench,
  .mobile-lotto-builder,
  .mobile-lotto-results,
  .mobile-digit-omission-panel,
  .lotto-n-out-n-panel,
  .dan-custom-search-panel,
  .set-calculator-condition-panel,
  .set-calculator-condition-list,
  .kl8-rotation-matrix,
  .lotto-rotation-matrix,
  .kl8-rotation-workbench,
  .kl8-rotation-results,
  .kl8-rotation-output,
  .lotto-rotation-zone
) {
  border-color: var(--calc-border) !important;
  background: var(--calc-card) !important;
  color: var(--calc-text) !important;
  transition: none !important;
}

.indicator-drawer.is-realtime-number-tool small,
.indicator-drawer.is-realtime-number-tool .set-calculator-status,
.indicator-drawer.is-realtime-number-tool .number-group-extractor__status,
.calculator-detail small,
.mobile-set-panel small {
  color: var(--calc-muted) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel .kl8-rotation-workbench,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel .kl8-rotation-results,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel .kl8-rotation-output {
  border-color: var(--calc-border) !important;
  background: var(--calc-result) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel .lotto-n-out-n-panel {
  border-color: var(--calc-border) !important;
  background: var(--calc-omission) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel .mobile-lotto-results {
  border-color: var(--calc-border) !important;
  background: var(--calc-result) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel .dan-custom-search-panel {
  border-color: #56576f !important;
  background: var(--calc-search) !important;
  color: var(--calc-text) !important;
}

#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-lotto-play-slot select,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel textarea,
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel input:not([type="color"]),
#indicatorDrawer.is-realtime-number-tool.is-set-calculator-tool #desktopUnifiedLotteryCalculator .desktop-unified-lottery-panel select {
  border-color: #526075 !important;
  background: var(--calc-input) !important;
  color: #edf1f7 !important;
}

@media (min-width: 1101px) {
  .indicator-drawer.is-number-group-tool {
    grid-template-columns: minmax(560px, 44%) minmax(0, 56%) !important;
    grid-template-rows: max-content minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
    background: var(--calc-workspace) !important;
  }

  .indicator-drawer.is-number-group-tool > .indicator-drawer__header {
    display: none !important;
  }

  .indicator-drawer.is-number-group-tool > .indicator-drawer__forms {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  .indicator-drawer.is-number-group-tool > .number-group-extractor {
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    grid-template-rows: auto minmax(210px, 44%) minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
    border: 1px solid var(--calc-border) !important;
    border-radius: 6px !important;
    background: var(--calc-card) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025) !important;
  }

  .indicator-drawer.is-number-group-tool > .number-group-ad {
    display: grid !important;
    position: relative;
    grid-column: 2 !important;
    grid-row: 2 !important;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--calc-border);
    border-radius: 6px;
    background: #17182c;
  }

  .indicator-drawer.is-number-group-tool > .indicator-list-rail,
  .indicator-drawer.is-number-group-tool > .desktop-dan-search-host,
  .indicator-drawer.is-number-group-tool .dan-custom-search-panel {
    display: none !important;
  }

  .number-group-extractor__header {
    min-width: 0;
    margin: -8px -8px 0;
    padding: 7px 8px;
    border-bottom: 1px solid #48556a;
    background: #303849;
    color: var(--calc-text) !important;
  }

  .number-group-extractor__actions {
    flex-wrap: nowrap;
  }

.number-group-paste {
    min-width: 68px;
    border-color: #6783a5 !important;
    background: #486586 !important;
  }

  .number-group-extractor__input {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 6px 0 8px !important;
    resize: none !important;
  }

  .number-group-extractor__results {
    display: grid !important;
    min-height: 0;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(10, minmax(34px, 1fr));
    gap: 4px !important;
    margin: 0 !important;
    overflow: hidden;
  }

  .number-group-result {
    display: grid !important;
    min-height: 0;
    grid-template-columns: 72px minmax(0, 1fr) 48px 56px !important;
    align-items: center;
    gap: 5px !important;
    padding: 3px 5px !important;
    border-color: #465369 !important;
    background: #252d3d !important;
  }

  .number-group-result__label {
    color: #d7dfeb !important;
    font-size: 12px !important;
  }

  .number-group-result__value {
    color: #f0f3f8 !important;
  }

  .number-group-result__value.is-empty {
    color: #8793a4 !important;
  }

  .number-group-result__count {
    color: #aeb9c8;
    text-align: right;
    white-space: nowrap;
  }

  .number-group-result .tool-button {
    min-width: 52px;
    height: 28px;
    padding: 2px 6px !important;
  }
}

/* Live actions never return to white/white-grey controls. */
:is(
  [data-platform-live-launcher],
  .lottery-live-action,
  [data-chat-feature="welfare-live"],
  [data-chat-feature="sports-live"],
  [data-business-action="official-live"],
  .module-tile[data-go="live"],
  .mobile-live button,
  .desktop-live button
) {
  border-color: #6c7f92 !important;
  background: #52677c !important;
  color: #eef3f6 !important;
  box-shadow: none !important;
}

:is(
  [data-chat-feature="welfare-live"],
  [data-business-action="official-live"][data-live-channel="welfare"],
  .mobile-live button.is-primary,
  .mobile-live .primary-button,
  .desktop-live button.is-primary
) {
  border-color: #6f887d !important;
  background: #587265 !important;
  color: #f0f5f2 !important;
}

:is(.mobile-live button.is-danger, .desktop-live button.is-danger) {
  border-color: #78877f !important;
  background: #5d6f66 !important;
  color: #f1f5f3 !important;
}

/* Lottery identity switches change immediately; never expose a grey transition frame. */
#indicatorDrawer #starButtons [data-lottery-switch] {
  transition: none !important;
}

html body #indicatorDrawer:has(#starButtons [data-lottery-switch="fc3d"].is-current-lottery) #starButtons [data-lottery-switch="fc3d"],
html body #indicatorDrawer:has(#starButtons [data-lottery-switch="fc3d"][aria-pressed="true"]) #starButtons [data-lottery-switch="fc3d"],
html body #indicatorDrawer[data-desktop-unified-calculator="ssq"] #starButtons [data-lottery-switch="ssq"],
html body #indicatorDrawer[data-desktop-unified-calculator="kl8"] #starButtons [data-lottery-switch="kl8"] {
  border-color: #aa9347 !important;
  background: #806f35 !important;
  color: #fff7d0 !important;
}

html body #indicatorDrawer:has(#starButtons [data-lottery-switch="pl3"].is-current-lottery) #starButtons [data-lottery-switch="pl3"],
html body #indicatorDrawer:has(#starButtons [data-lottery-switch="pl3"][aria-pressed="true"]) #starButtons [data-lottery-switch="pl3"],
html body #indicatorDrawer:has(#starButtons [data-lottery-switch="5"].is-current-lottery) #starButtons [data-lottery-switch="5"],
html body #indicatorDrawer:has(#starButtons [data-lottery-switch="5"][aria-pressed="true"]) #starButtons [data-lottery-switch="5"],
html body #indicatorDrawer[data-desktop-unified-calculator="dlt"] #starButtons [data-lottery-switch="dlt"] {
  border-color: #61927a !important;
  background: #46735d !important;
  color: #e8fff3 !important;
}

/* All expanded indicator controls use close, low-glare blue-grey states. */
html body .indicator-drawer.is-realtime-number-tool :is(
  .indicator-form-button,
  .indicator-series-button,
  .indicator-option-button
) {
  border-color: #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  background-color: #5e7189 !important;
  color: #f4f7fb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(18,29,43,.22), 0 2px 3px rgba(7,13,22,.34) !important;
  transition: none !important;
}

html body .indicator-drawer.is-realtime-number-tool :is(
  .indicator-form-button,
  .indicator-series-button,
  .indicator-option-button
)[aria-pressed="true"] {
  border-color: #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(5,54,98,.3), 0 2px 5px rgba(7,18,34,.44) !important;
}

html body #indicatorDrawer.indicator-drawer.is-realtime-number-tool
#indicatorDrawerBody .indicator-section
.indicator-series-buttons > .indicator-series-button:not([aria-pressed="true"]) {
  border-color: #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  background-color: #5e7189 !important;
  color: #f4f7fb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(18,29,43,.22), 0 2px 3px rgba(7,13,22,.34) !important;
}

html body #indicatorDrawer.indicator-drawer.is-realtime-number-tool
#indicatorDrawerBody .indicator-section
.indicator-series-buttons > .indicator-series-button[aria-pressed="true"] {
  border-color: #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(5,54,98,.3), 0 2px 5px rgba(7,18,34,.44) !important;
}

html body .calculator-detail :is(
  .mobile-calc-form-grid,
  .mobile-calc-series-grid,
  .mobile-calc-options
) .mobile-calc-choice,
html body .mobile-chart-quick-indicators :is(
  .mobile-chart-quick-forms,
  .mobile-chart-quick-series,
  .mobile-chart-quick-option-buttons
) button {
  border-color: #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  background-color: #5e7189 !important;
  color: #f4f7fb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(18,29,43,.22), 0 2px 3px rgba(7,13,22,.34) !important;
  transition: none !important;
}

html body .calculator-detail :is(
  .mobile-calc-form-grid,
  .mobile-calc-series-grid,
  .mobile-calc-options
) .mobile-calc-choice[aria-pressed="true"],
html body .mobile-chart-quick-indicators :is(
  .mobile-chart-quick-forms,
  .mobile-chart-quick-series,
  .mobile-chart-quick-option-buttons
) button[aria-pressed="true"] {
  border-color: #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(5,54,98,.3), 0 2px 5px rgba(7,18,34,.44) !important;
}

html body .calculator-detail .mobile-calc-options > .mobile-calc-choice[aria-pressed="true"],
html body .mobile-chart-quick-indicators .mobile-chart-quick-option-buttons > button[aria-pressed="true"] {
  border-color: #9bd2ff !important;
  background: #2f8fe6 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 2px 5px rgba(7, 18, 34, .42) !important;
}

/* Search workspaces are deliberately 60% lighter than their preceding dark layers. */
html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .historical-omission-panel,
  .set-calculator-omission-panel,
  .mobile-digit-omission-panel,
  .lotto-n-out-n-panel
) {
  border-color: #9dadc0 !important;
  background: #74869e !important;
  color: #f7f9fc !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .historical-omission-panel__header,
  .historical-omission-controls,
  .lotto-n-out-n-controls
) {
  border-color: #a8b7c8 !important;
  background: #8192a8 !important;
  color: #ffffff !important;
}

/* V106 final current-lottery cascade. Keep this block last. */
html body #indicatorDrawer #starButtons :is([data-lottery-switch="fc3d"], [data-lottery-switch="ssq"], [data-lottery-switch="kl8"])[aria-pressed="true"] {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #ffe36a 0%, #d9a916 100%) !important;
  background-color: #f0c437 !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer #starButtons :is([data-lottery-switch="pl3"], [data-lottery-switch="5"], [data-lottery-switch="dlt"])[aria-pressed="true"] {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #70eab0 0%, #2bbd77 100%) !important;
  background-color: #54d999 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer #starButtons :is([data-lottery-switch="custom"], [data-lottery-switch="groups"])[aria-pressed="true"] {
  border: 2px solid #bfe1ff !important;
  background: linear-gradient(180deg, #82cbff 0%, #398fe7 100%) !important;
  background-color: #62b2f6 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #144c91, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body :is(#screen-calculator-3d, #screen-calculator-ssq, #screen-calculator-kl8) .calculator-game-strip button.is-on {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #e2bd39 0%, #b7890b 100%) !important;
  background-color: #c99e19 !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.52) !important;
}

html body :is(#screen-calculator-pl3, #screen-calculator-pl5, #screen-calculator-dlt) .calculator-game-strip button.is-on {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #43c985 0%, #168751 100%) !important;
  background-color: #25aa68 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.52) !important;
}

/* V107 absolute final result-field override; calculator harmony loads after mobile-app.css. */
html body #indicatorDrawer#indicatorDrawer.is-realtime-number-tool:not([data-desktop-unified-calculator="kl8"]):not([data-desktop-unified-calculator="ssq"]):not([data-desktop-unified-calculator="dlt"]) :is(.indicator-result-numbers, .set-calculator-output),
html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-results.mobile-calc-results .mobile-calc-result-text.mobile-calc-result-text {
  border-color: #d8e0e8 !important;
  background: #c4d0dc !important;
  color: #111820 !important;
  caret-color: #111820 !important;
}

/* V107 final cascade: keep result hierarchy and calculation identity after every shared button rule. */
html body #indicatorDrawer#indicatorDrawer.is-realtime-number-tool [data-realtime-command="calculate"],
html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-draft-actions.mobile-calc-draft-actions .is-calculate {
  border-color: #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #277fc5 100%) !important;
  background-color: #277fc5 !important;
  color: #ffffff !important;
}

html body #indicatorDrawer#indicatorDrawer.is-realtime-number-tool:not([data-desktop-unified-calculator="kl8"]):not([data-desktop-unified-calculator="ssq"]):not([data-desktop-unified-calculator="dlt"]) :is(.indicator-result-numbers, .set-calculator-output),
html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-results.mobile-calc-results .mobile-calc-result-text {
  border-color: #d8e0e8 !important;
  background: #c4d0dc !important;
  color: #111820 !important;
  caret-color: #111820 !important;
}

/* V107: long condition text ends before its fixed remove button. */
html body #indicatorDrawer.is-realtime-number-tool :is(.indicator-condition, .set-calculator-condition) {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
}

html body #indicatorDrawer.is-realtime-number-tool .indicator-condition {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

html body #indicatorDrawer.is-realtime-number-tool :is(.indicator-condition, .set-calculator-condition) > span:first-child {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
}

html body #indicatorDrawer.is-realtime-number-tool :is(.indicator-condition__remove, .set-calculator-condition__remove) {
  flex: 0 0 auto !important;
  justify-self: end !important;
}

/* FC3D, PL3 and PL5 indicator controls are exactly 10% taller without changing columns. */
html body #indicatorDrawer.is-realtime-number-tool:not([data-desktop-unified-calculator="kl8"]):not([data-desktop-unified-calculator="ssq"]):not([data-desktop-unified-calculator="dlt"]) :is(.indicator-form-button, .indicator-series-button, .indicator-option-button) {
  height: 34.1px !important;
  min-height: 34.1px !important;
}

html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-choice {
  min-height: 44px !important;
}

html body .mobile-chart-quick-indicators:is([data-mobile-chart-quick-game="fc3d"], [data-mobile-chart-quick-game="pl3"], [data-mobile-chart-quick-game="pl5"]) :is(.mobile-chart-quick-forms, .mobile-chart-quick-series, .mobile-chart-quick-option-buttons) button {
  min-height: 28.6px !important;
}

/* Result clear actions stay at the right edge. */
html body #indicatorDrawer.is-realtime-number-tool .indicator-result-actions {
  display: flex !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  align-items: center !important;
}

html body #indicatorDrawer.is-realtime-number-tool .indicator-result-actions .indicator-clear-button {
  margin-left: auto !important;
}

html body #indicatorDrawer.is-realtime-number-tool .set-calculator-results > .set-calculator-actions #setCalculatorResultClear {
  justify-self: end !important;
}

/* Digit result fields are the lightest calculator surface and use dark result text. */
html body #indicatorDrawer.is-realtime-number-tool:not([data-desktop-unified-calculator="kl8"]):not([data-desktop-unified-calculator="ssq"]):not([data-desktop-unified-calculator="dlt"]) :is(.indicator-result-numbers, .set-calculator-output),
html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-result-text {
  border-color: #d2dae3 !important;
  background: #c4d0dc !important;
  color: #111820 !important;
  caret-color: #111820 !important;
}

html body .mobile-calc-condition {
  grid-template-columns: minmax(0, 1fr) 34px !important;
}

html body .mobile-calc-condition > span > b {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
}

/* V107 fixed digit action order. */
html body #indicatorDrawer.is-realtime-number-tool:not([data-desktop-unified-calculator="kl8"]):not([data-desktop-unified-calculator="ssq"]):not([data-desktop-unified-calculator="dlt"]) .indicator-config__actions {
  grid-template-columns: var(--realtime-label-width, 108px) repeat(10, minmax(0, 1fr)) !important;
}

html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="base"] { grid-column: 2 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="invert"] { grid-column: 3 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-indicator-command="exclude"] { grid-column: 4 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-indicator-command="add"] { grid-column: 5 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="calculate"] { grid-column: 6 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="chart"] { grid-column: 7 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="copy"] { grid-column: 8 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="copy-image"] { grid-column: 9 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-indicator-command="clear"] { grid-column: 10 !important; }
html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="share"] { grid-column: 11 !important; }

html body #indicatorDrawer.is-realtime-number-tool [data-realtime-command="calculate"],
html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-draft-actions .is-calculate {
  border-color: #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #277fc5 100%) !important;
  color: #ffffff !important;
}

html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-draft-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-draft-actions :is(.is-invert, .is-copy-image, .is-publish) {
  border-color: #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  color: #f4f7fb !important;
}

@media (max-width: 900px) {
  html body #indicatorDrawer.is-realtime-number-tool .indicator-config__actions > * {
    grid-column: auto !important;
  }
}

html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="fc3d"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="fc3d"][aria-pressed="true"],
html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="ssq"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="ssq"][aria-pressed="true"],
html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="kl8"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="kl8"][aria-pressed="true"] {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #ffe36a 0%, #d9a916 100%) !important;
  background-color: #f0c437 !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="pl3"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="pl3"][aria-pressed="true"],
html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="5"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="5"][aria-pressed="true"],
html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="dlt"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="dlt"][aria-pressed="true"] {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #70eab0 0%, #2bbd77 100%) !important;
  background-color: #54d999 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="custom"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="custom"][aria-pressed="true"],
html body #indicatorDrawer#indicatorDrawer:has(#starButtons#starButtons [data-lottery-switch="groups"][aria-pressed="true"]) #starButtons#starButtons [data-lottery-switch="groups"][aria-pressed="true"] {
  border: 2px solid #bfe1ff !important;
  background: linear-gradient(180deg, #82cbff 0%, #398fe7 100%) !important;
  background-color: #62b2f6 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #144c91, 0 3px 7px rgba(9,13,20,.58) !important;
}

/* Current lottery must be unmistakable: solid bright group fill, not an outline-only state. */
html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="fc3d"],
  [data-lottery-switch="ssq"],
  [data-lottery-switch="kl8"]
)[aria-pressed="true"] {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #e2bd39 0%, #b7890b 100%) !important;
  background-color: #c99e19 !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="pl3"],
  [data-lottery-switch="5"],
  [data-lottery-switch="dlt"]
)[aria-pressed="true"] {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #43c985 0%, #168751 100%) !important;
  background-color: #25aa68 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="custom"],
  [data-lottery-switch="groups"]
)[aria-pressed="true"] {
  border: 2px solid #bfe1ff !important;
  background: linear-gradient(180deg, #5eb5fa 0%, #236fc3 100%) !important;
  background-color: #388fe0 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #144c91, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body :is(#screen-calculator-3d, #screen-calculator-ssq, #screen-calculator-kl8)
.calculator-game-strip button.is-on {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #e2bd39 0%, #b7890b 100%) !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.52) !important;
}

html body :is(#screen-calculator-pl3, #screen-calculator-pl5, #screen-calculator-dlt)
.calculator-game-strip button.is-on {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #43c985 0%, #168751 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.52) !important;
}

/* Final zone identity after desktop editors are mounted into the shared workspace. */
html body #indicatorDrawer[data-desktop-unified-calculator="ssq"] [data-desktop-zone="red"] .desktop-lotto-number,
html body #indicatorDrawer[data-desktop-unified-calculator="dlt"] [data-desktop-zone="front"] .desktop-lotto-number,
html body #screen-calculator-ssq [data-lotto-zone="red"] .mobile-lotto-ball,
html body #screen-calculator-dlt [data-lotto-zone="front"] .mobile-lotto-ball {
  border-color: #e4a0a9 !important;
  background: #c95d6d !important;
  color: #fff7f8 !important;
}

html body #indicatorDrawer[data-desktop-unified-calculator="ssq"] [data-desktop-zone="blue"] .desktop-lotto-number,
html body #indicatorDrawer[data-desktop-unified-calculator="dlt"] [data-desktop-zone="back"] .desktop-lotto-number,
html body #screen-calculator-ssq [data-lotto-zone="blue"] .mobile-lotto-ball,
html body #screen-calculator-dlt [data-lotto-zone="back"] .mobile-lotto-ball {
  border-color: #9cc8ec !important;
  background: #4f8fc8 !important;
  color: #f5fbff !important;
}

html body #indicatorDrawer:is([data-desktop-unified-calculator="ssq"], [data-desktop-unified-calculator="dlt"])
:is([data-desktop-zone="red"], [data-desktop-zone="front"]) .desktop-lotto-number.number-temperature-warm,
html body :is(#screen-calculator-ssq, #screen-calculator-dlt)
:is([data-lotto-zone="red"], [data-lotto-zone="front"]) .mobile-lotto-ball.number-temperature-warm {
  background: #bd6572 !important;
}

html body #indicatorDrawer:is([data-desktop-unified-calculator="ssq"], [data-desktop-unified-calculator="dlt"])
:is([data-desktop-zone="red"], [data-desktop-zone="front"]) .desktop-lotto-number.number-temperature-cold,
html body :is(#screen-calculator-ssq, #screen-calculator-dlt)
:is([data-lotto-zone="red"], [data-lotto-zone="front"]) .mobile-lotto-ball.number-temperature-cold {
  background: #ad6974 !important;
}

html body #indicatorDrawer:is([data-desktop-unified-calculator="ssq"], [data-desktop-unified-calculator="dlt"])
:is([data-desktop-zone="blue"], [data-desktop-zone="back"]) .desktop-lotto-number.number-temperature-warm,
html body :is(#screen-calculator-ssq, #screen-calculator-dlt)
:is([data-lotto-zone="blue"], [data-lotto-zone="back"]) .mobile-lotto-ball.number-temperature-warm {
  background: #5d91bf !important;
}

html body #indicatorDrawer:is([data-desktop-unified-calculator="ssq"], [data-desktop-unified-calculator="dlt"])
:is([data-desktop-zone="blue"], [data-desktop-zone="back"]) .desktop-lotto-number.number-temperature-cold,
html body :is(#screen-calculator-ssq, #screen-calculator-dlt)
:is([data-lotto-zone="blue"], [data-lotto-zone="back"]) .mobile-lotto-ball.number-temperature-cold {
  background: #668dad !important;
}

html body #indicatorDrawer:is([data-desktop-unified-calculator="ssq"], [data-desktop-unified-calculator="dlt"])
.desktop-lotto-number[aria-pressed="true"],
html body :is(#screen-calculator-ssq, #screen-calculator-dlt)
.mobile-lotto-ball[aria-pressed="true"] {
  filter: brightness(1.22) saturate(1.14);
  outline: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(20,30,45,.24), 0 0 0 2px #ffffff !important;
}

/* Exact final cascade for digit forms, series and parameter choices. */
html body #indicatorDrawer.indicator-drawer.is-realtime-number-tool :is(
  #indicatorFormButtons .indicator-form-button,
  #indicatorDrawerBody .indicator-series-button,
  #indicatorConfig .indicator-option-button
):not([aria-pressed="true"]):not(:disabled) {
  border: 1px solid #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  background-color: #5e7189 !important;
  color: #f4f7fb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(18,29,43,.22), 0 2px 3px rgba(7,13,22,.34) !important;
  outline: none !important;
}

html body #indicatorDrawer.indicator-drawer.is-realtime-number-tool :is(
  #indicatorFormButtons .indicator-form-button,
  #indicatorDrawerBody .indicator-series-button,
  #indicatorConfig .indicator-option-button
)[aria-pressed="true"] {
  border: 1px solid #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(5,54,98,.3), 0 2px 5px rgba(7,18,34,.44) !important;
  outline: none !important;
}

html body .calculator-detail :is(
  .mobile-calc-form-grid,
  .mobile-calc-series-grid,
  .mobile-calc-options
) .mobile-calc-choice:not([aria-pressed="true"]):not(:disabled),
html body .mobile-chart-quick-indicators :is(
  .mobile-chart-quick-forms,
  .mobile-chart-quick-series,
  .mobile-chart-quick-option-buttons
) button:not([aria-pressed="true"]):not(:disabled) {
  border: 1px solid #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  background-color: #5e7189 !important;
  color: #f4f7fb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(18,29,43,.22), 0 2px 3px rgba(7,13,22,.34) !important;
  outline: none !important;
}

html body .calculator-detail :is(
  .mobile-calc-form-grid,
  .mobile-calc-series-grid,
  .mobile-calc-options
) .mobile-calc-choice[aria-pressed="true"],
html body .mobile-chart-quick-indicators :is(
  .mobile-chart-quick-forms,
  .mobile-chart-quick-series,
  .mobile-chart-quick-option-buttons
) button[aria-pressed="true"] {
  border: 1px solid #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(5,54,98,.3), 0 2px 5px rgba(7,18,34,.44) !important;
  outline: none !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .historical-omission-result,
  .historical-omission-output,
  .lotto-n-out-n-panel textarea
) {
  border-color: #94a6bb !important;
  background: #667a93 !important;
  color: #ffffff !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) .dan-custom-search-panel {
  border-color: #a3b4c7 !important;
  background: #788ba3 !important;
  color: #f8fafd !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) .dan-custom-search-panel :is(
  header,
  .dan-custom-search-fields,
  .dan-custom-search-zones,
  .dan-custom-search-actions
) {
  border-color: #adbac9 !important;
  background: #8495aa !important;
  color: #ffffff !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) .dan-custom-search-panel :is(input, select, textarea, [data-dan-search-three-chart]) {
  border-color: #98aabe !important;
  background: #687c95 !important;
  color: #ffffff !important;
}

.number-group-ad[hidden] {
  display: none !important;
}

.number-group-ad__mark,
.number-group-ad__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.number-group-ad__mark img,
.number-group-ad__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.number-group-ad__text {
  z-index: 2;
  display: block;
  width: 100%;
  padding: 10px 16px;
  box-sizing: border-box;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

.number-group-ad[data-caption-scroll="left"] .number-group-ad__text {
  animation: number-group-ad-scroll-left var(--number-group-ad-scroll-duration, 9s) linear infinite;
  white-space: nowrap;
}

.number-group-ad[data-caption-scroll="right"] .number-group-ad__text {
  animation: number-group-ad-scroll-right var(--number-group-ad-scroll-duration, 9s) linear infinite;
  white-space: nowrap;
}

@keyframes number-group-ad-scroll-left {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

@keyframes number-group-ad-scroll-right {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (max-width: 1100px) {
  .number-group-ad {
    display: grid;
    position: relative;
    min-height: 180px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--calc-border);
    border-radius: 6px;
    background: #17182c;
  }
}

/* V106: every calculator control reads as an individual raised button. */
html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel,
  .mobile-chart-quick-indicators
) :is(
  .tool-button,
  .indicator-form-button,
  .indicator-series-button,
  .indicator-option-button,
  .mobile-calc-choice,
  .set-calculator-mode-tab,
  .set-calculator-dan-button,
  .desktop-lotto-count,
  .desktop-lotto-condition-row button,
  .desktop-lotto-compact-editor > footer button,
  .dan-custom-search-actions button,
  .historical-omission-controls button
):not(.desktop-lotto-number):not(.mobile-lotto-ball):not(.kl8-rotation-number):not(.lotto-rotation-number):not([aria-pressed="true"]):not(.is-selected):not(.is-primary):not(:disabled) {
  border: 1px solid #91a4ba !important;
  background: linear-gradient(180deg, #71839b 0%, #5e7189 100%) !important;
  background-color: #5e7189 !important;
  color: #f4f7fb !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    inset 0 -1px 0 rgba(18, 29, 43, .22),
    0 2px 3px rgba(7, 13, 22, .34) !important;
  outline: none !important;
  transition: none !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel,
  .mobile-chart-quick-indicators
) :is(
  .tool-button,
  .indicator-form-button,
  .indicator-series-button,
  .indicator-option-button,
  .mobile-calc-choice,
  .set-calculator-mode-tab,
  .set-calculator-dan-button,
  .desktop-lotto-count,
  .desktop-lotto-condition-row button,
  .desktop-lotto-compact-editor > footer button
)[aria-pressed="true"]:not(.desktop-lotto-number):not(.mobile-lotto-ball):not(.kl8-rotation-number):not(.lotto-rotation-number),
html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(button.is-primary, .desktop-lotto-add, .set-calculator-calculate, .historical-omission-search-button) {
  border: 1px solid #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -1px 0 rgba(5, 54, 98, .3),
    0 2px 5px rgba(7, 18, 34, .44) !important;
  outline: none !important;
  transition: none !important;
}

/* Lottery identities stay visible even when inactive; selection brightens the whole tab. */
html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="fc3d"],
  [data-lottery-switch="ssq"],
  [data-lottery-switch="kl8"]
) {
  border-color: #a89143 !important;
  background: linear-gradient(180deg, #756a3c 0%, #5e552f 100%) !important;
  background-color: #5e552f !important;
  color: #fff2b3 !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="fc3d"],
  [data-lottery-switch="ssq"],
  [data-lottery-switch="kl8"]
)[aria-pressed="true"] {
  border-color: #ffe081 !important;
  background: linear-gradient(180deg, #b99a33 0%, #897321 100%) !important;
  background-color: #897321 !important;
  color: #fffbe6 !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="pl3"],
  [data-lottery-switch="5"],
  [data-lottery-switch="dlt"]
) {
  border-color: #69a187 !important;
  background: linear-gradient(180deg, #4f7966 0%, #3d604f 100%) !important;
  background-color: #3d604f !important;
  color: #e7fff2 !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="pl3"],
  [data-lottery-switch="5"],
  [data-lottery-switch="dlt"]
)[aria-pressed="true"] {
  border-color: #9fe2bf !important;
  background: linear-gradient(180deg, #4f9b73 0%, #347654 100%) !important;
  background-color: #347654 !important;
  color: #f3fff8 !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="custom"],
  [data-lottery-switch="groups"]
) {
  border-color: #8299be !important;
  background: linear-gradient(180deg, #687da0 0%, #536785 100%) !important;
  background-color: #536785 !important;
  color: #f1f5ff !important;
}

html body #indicatorDrawer #starButtons :is(
  [data-lottery-switch="custom"],
  [data-lottery-switch="groups"]
)[aria-pressed="true"] {
  border-color: #b8ceef !important;
  background: linear-gradient(180deg, #7f9ac5 0%, #607cab 100%) !important;
  background-color: #607cab !important;
  color: #ffffff !important;
}

html body #indicatorDrawer #starButtons :is(.pl5-star-mode__button, .star-button)[aria-pressed="true"] {
  border-color: #a9ddff !important;
  background: linear-gradient(180deg, #69c5ff 0%, #349de9 100%) !important;
  background-color: #58b8f7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 5px rgba(7, 18, 34, .44) !important;
}

/* The indicator rail is lighter, while calculation output is the palest workspace. */
html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .indicator-list-rail,
  .indicator-list-rail .set-calculator-condition-panel,
  .indicator-list-rail .indicator-workbench__conditions,
  .set-calculator-condition-panel
) {
  border-color: #9eafc1 !important;
  background: #71839a !important;
  color: #ffffff !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .indicator-list-rail .indicator-condition-list,
  .indicator-list-rail .set-calculator-condition-list
) {
  border-color: #a8b7c7 !important;
  background: #7c8ea4 !important;
  color: #ffffff !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .indicator-results-panel,
  .set-calculator-results,
  .mobile-calc-results,
  .mobile-lotto-results
) {
  border-color: #bac6d3 !important;
  background: #91a4ba !important;
  color: #ffffff !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .indicator-results__header,
  .set-calculator-results__header,
  .mobile-calc-results > header,
  .mobile-lotto-results > header
) {
  border-color: #c5cfda !important;
  background: #9eafc1 !important;
  color: #ffffff !important;
}

html body :is(
  #indicatorDrawer.indicator-drawer.is-realtime-number-tool,
  .calculator-detail,
  .mobile-set-panel
) :is(
  .indicator-result-numbers,
  .set-calculator-output,
  .mobile-calc-results textarea,
  .mobile-lotto-result-output,
  .mobile-lotto-results.is-empty > p
) {
  border-color: #b2c0ce !important;
  background: #8398ae !important;
  color: #ffffff !important;
}

/* V106 FINAL OVERRIDE: current lottery is unmistakably selected. */
html body #indicatorDrawer #starButtons :is([data-lottery-switch="fc3d"], [data-lottery-switch="ssq"], [data-lottery-switch="kl8"])[aria-pressed="true"] {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #ffe36a 0%, #d9a916 100%) !important;
  background-color: #f0c437 !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer #starButtons :is([data-lottery-switch="pl3"], [data-lottery-switch="5"], [data-lottery-switch="dlt"])[aria-pressed="true"] {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #70eab0 0%, #2bbd77 100%) !important;
  background-color: #54d999 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body #indicatorDrawer #starButtons :is([data-lottery-switch="custom"], [data-lottery-switch="groups"])[aria-pressed="true"] {
  border: 2px solid #bfe1ff !important;
  background: linear-gradient(180deg, #82cbff 0%, #398fe7 100%) !important;
  background-color: #62b2f6 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #144c91, 0 3px 7px rgba(9,13,20,.58) !important;
}

html body :is(#screen-calculator-3d, #screen-calculator-ssq, #screen-calculator-kl8) .calculator-game-strip button.is-on {
  border: 2px solid #ffe98a !important;
  background: linear-gradient(180deg, #ffe36a 0%, #d9a916 100%) !important;
  background-color: #f0c437 !important;
  color: #211900 !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -4px 0 #705000, 0 3px 7px rgba(9,13,20,.52) !important;
}

html body :is(#screen-calculator-pl3, #screen-calculator-pl5, #screen-calculator-dlt) .calculator-game-strip button.is-on {
  border: 2px solid #a8f0c8 !important;
  background: linear-gradient(180deg, #70eab0 0%, #2bbd77 100%) !important;
  background-color: #54d999 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 0 #075b35, 0 3px 7px rgba(9,13,20,.52) !important;
}

html body[data-v107-result-palette],
html body:not([data-v107-result-palette]) {
  --v107-result-background: #c4d0dc;
}

html body #indicatorDrawer#indicatorDrawer.is-realtime-number-tool:not([data-desktop-unified-calculator="kl8"]):not([data-desktop-unified-calculator="ssq"]):not([data-desktop-unified-calculator="dlt"]) :is(.indicator-result-numbers, .set-calculator-output),
html body :is(#screen-calculator-3d, #screen-calculator-pl3, #screen-calculator-pl5) .mobile-calc-results.mobile-calc-results .mobile-calc-result-text.mobile-calc-result-text {
  border-color: #d8e0e8 !important;
  background: var(--v107-result-background) !important;
  color: #111820 !important;
  caret-color: #111820 !important;
}
