/* LottoAI soft light theme — opt-in with html.lotto-soft-light. */
html.lotto-soft-light {
  --soft-bg: #eef0ef;
  --soft-bg-2: #e8ebe9;
  --soft-surface: #ffffff;
  --soft-surface-2: #f7f8f7;
  --soft-surface-3: #f1f3f2;
  --soft-line: #dfe3e0;
  --soft-line-strong: #c3cac6;
  --soft-text: #22302b;
  --soft-muted: #5b6a64;
  --soft-faint: #88938f;
  --soft-green: #009c41;
  --soft-green-2: #12ad52;
  --soft-green-pale: #e6f4ea;
  --soft-gold-pale: #fff6df;
  --soft-red-pale: #fff0ef;
  --soft-shadow: 0 12px 30px rgba(30, 42, 36, .09);
  --soft-shadow-small: 0 5px 14px rgba(30, 42, 36, .07);
  --kw-white: #173b32 !important;
  --kw-offwhite: #3f4f49 !important;
  --kw-cream: #3f4f49 !important;
  --kw-blush: #ffffff !important;
  --kw-border: #dfe5e1 !important;
  --kw-muted: #5b6a64 !important;
  --kw-dark: #173b32 !important;
  --primary: #009c41 !important;
  --bg: #eef0ef !important;
  --accent: #12ad52 !important;
  --sidebar-bg: #ffffff !important;
  --sidebar-border: #dfe5e1 !important;
  --sidebar-strong: #173b32 !important;
  --sidebar-toggle: #009c41 !important;
  --glass-bg: rgba(255, 254, 251, .96) !important;
  --glass-border: #dfe5e1 !important;
  --glass-highlight: rgba(255, 255, 255, .8) !important;
  --glass-shadow: rgba(37, 70, 58, .08) !important;
  --card: #ffffff !important;
  --border: #dfe5e1 !important;
  --text-primary: #173b32 !important;
  --text-secondary: #3f4f49 !important;
  --text-muted: #5b6a64 !important;
  --text-faint: #88938f !important;
  --surface-dark: #edf5f0 !important;
  --surface-card: #ffffff !important;
  --surface-input: #f7faf7 !important;
  --input-text: #173b32 !important;
  --input-caret: #009c41 !important;
  --scrollbar-thumb: #bfe3cb !important;
  --scrollbar-hover: #76aa97 !important;
  --ux-shell: #eef0ef !important;
  --deep-bg: #eef0ef !important;
  --deep-panel: #ffffff !important;
  --deep-panel-2: #edf5f0 !important;
  --deep-panel-3: #e6f4ea !important;
  --deep-line: #dfe5e1 !important;
  --deep-line-strong: #bfe3cb !important;
  --deep-accent: #009c41 !important;
  --deep-accent-bright: #12ad52 !important;
  color-scheme: light !important;
  background: var(--soft-bg) !important;
}

html.lotto-soft-light body,
html.lotto-soft-light body.light-theme {
  color: var(--soft-text) !important;
  background:
    radial-gradient(circle at 50% -10%, rgba(174, 213, 197, .28), transparent 36%),
    linear-gradient(180deg, #fafcf9 0%, var(--soft-bg) 50%, var(--soft-bg-2) 100%) !important;
  background-attachment: fixed !important;
}
html.lotto-soft-light body::before { opacity: .018 !important; mix-blend-mode: multiply !important; }
html.lotto-soft-light body::after { background: radial-gradient(ellipse 700px 360px at 50% 0, rgba(118, 170, 151, .12), transparent 72%) !important; opacity: 1 !important; }

html.lotto-soft-light :where(.app-header,#fb_login_bar,.page-switch-bar,.tab-bar,#appSidebar,.sidebar,.side-menu) {
  background: rgba(255, 254, 251, .97) !important;
  border-color: var(--soft-line) !important;
  color: var(--soft-text) !important;
  box-shadow: var(--soft-shadow-small) !important;
}
html.lotto-soft-light #appSidebar { box-shadow: 12px 0 28px rgba(37, 70, 58, .08) !important; }
html.lotto-soft-light #sidebarOverlay { background: rgba(29, 58, 49, .26) !important; }
html.lotto-soft-light :where(.logo-text,.smart-brand-title,.sb-group-hdr,.sb-label,.page-title,.title,[class$="-title"],[class$="Title"]) { color: var(--soft-text) !important; }
html.lotto-soft-light :where(.subtitle,.smart-brand-sub,[class$="-sub"],[class$="-meta"],[class$="-hint"],[class$="-note"]) { color: var(--soft-muted) !important; }
html.lotto-soft-light .sb-btn { color: #3f4f49 !important; background: transparent !important; border-color: transparent !important; }
html.lotto-soft-light .sb-btn:hover { color: var(--soft-green) !important; background: var(--soft-green-pale) !important; }
html.lotto-soft-light .sb-btn.sb-active,
html.lotto-soft-light .sb-btn.active { color: #074e25 !important; background: #e6f4ea !important; border-color: #bfe3cb !important; }
html.lotto-soft-light .sb-group-hdr { background: #f7faf7 !important; border-color: var(--soft-line) !important; }

html.lotto-soft-light #smartDock {
  background: rgba(255, 254, 251, .96) !important;
  border-color: var(--soft-line) !important;
  box-shadow: 0 9px 24px rgba(37, 70, 58, .08) !important;
}
html.lotto-soft-light .smart-brand-mark { background-color: #fffcf4 !important; box-shadow: none !important; }
html.lotto-soft-light :where(.smart-lotto-btn,.smart-input,.smart-btn.ghost,.smart-pae-entry) {
  color: var(--soft-text) !important;
  background: var(--soft-surface-2) !important;
  border-color: var(--soft-line) !important;
  box-shadow: inset 0 1px 0 #fff !important;
}
html.lotto-soft-light :where(.smart-input,input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),select,textarea,.search-input,.latest-search,.db-input,.scope-sel) {
  color: var(--soft-text) !important;
  background: #fbfdfb !important;
  border-color: var(--soft-line) !important;
  box-shadow: inset 0 1px 2px rgba(37, 70, 58, .03) !important;
}
html.lotto-soft-light :where(input,textarea)::placeholder { color: #88938f !important; }
html.lotto-soft-light select option,
html.lotto-soft-light select optgroup { color: var(--soft-text) !important; background: #ffffff !important; }

.lotto-theme-toggle {
  min-width: 44px !important;
  padding-inline: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  color: #f1fff9 !important;
  background: #07594d !important;
  border: 1px solid #2b8b76 !important;
  box-shadow: none !important;
}
.lotto-theme-toggle span { font-size: 1rem; line-height: 1; }
.lotto-theme-toggle b { font-size: .68rem; }
html.lotto-soft-light .lotto-theme-toggle {
  color: #5c4b1b !important;
  background: #fff4cc !important;
  border-color: #dfc468 !important;
}

/* Share card is a modal. Older builds had no base display rule, so it leaked into
   the document and made the analysis page look like a long blank section. */
.share-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  display: none !important;
  place-items: center !important;
  padding: 18px !important;
  overflow: auto !important;
  background: rgba(0, 24, 19, .76) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}
.share-overlay.show { display: grid !important; }
.share-card-wrap {
  width: min(620px, 100%) !important;
  max-height: calc(100dvh - 36px) !important;
  overflow: auto !important;
  padding: 16px !important;
  border: 1px solid rgba(92, 196, 164, .32) !important;
  border-radius: 20px !important;
  background: #032e27 !important;
  box-shadow: 0 24px 70px rgba(0, 14, 11, .48) !important;
}
.share-actions { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 8px !important; }
html.lotto-soft-light .share-overlay { background: rgba(30, 58, 49, .32) !important; }
html.lotto-soft-light .share-card-wrap {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  border-color: var(--soft-line) !important;
  box-shadow: 0 24px 70px rgba(37, 70, 58, .18) !important;
}

/* Smart dock: keep the action strip readable in both modes. */
html.lotto-soft-light #smartDock,
html.lotto-soft-light #smartDock .smart-dock-inner,
html.lotto-soft-light #smartDock .smart-brand,
html.lotto-soft-light #smartDock .smart-actions { color: var(--soft-text) !important; }
html.lotto-soft-light #smartDock :where(.smart-brand-title,#smartDockLottoLabel) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}
html.lotto-soft-light #smartDock .smart-btn.ghost {
  color: #3f4f49 !important;
  background: #edf5f0 !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light #smartDock :where(.smart-btn.nl-launcher,.smart-btn.lai-launcher) {
  color: #074e25 !important;
  background: #e6f4ea !important;
  border-color: #bfe3cb !important;
}
html.lotto-soft-light #smartDock :where(.smart-btn.nl-launcher,.smart-btn.lai-launcher) > * {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}
html.lotto-soft-light .lotto-theme-toggle > * { color: inherit !important; -webkit-text-fill-color: currentColor !important; }

#hmDetailModal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background: rgba(0, 20, 16, .74) !important;
}
#hmDetailModal.open { display: flex !important; }
#hmDetailModal .hm-modal-box { width: min(440px, 100%) !important; max-height: calc(100dvh - 36px) !important; overflow: auto !important; }
html.lotto-soft-light #hmDetailModal { background: rgba(30, 58, 49, .30) !important; }
html.lotto-soft-light #hmDetailModal .hm-modal-box {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  border-color: var(--soft-line) !important;
  box-shadow: 0 24px 70px rgba(37, 70, 58, .18) !important;
}
html.lotto-soft-light #hmDetailModal :where(.hm-modal-close,.hm-modal-num,.hm-modal-sub,.hm-modal-eng-name,.hm-modal-eng-pair,.hm-modal-empty) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}

html.lotto-soft-light :where(#page-main.tab-page.active,.main-page-wrap,.tab-page) { background: transparent !important; }
html.lotto-soft-light :where(
  .top-control,.latest-sync-card,.latest-selected-card,.latest-group-card,.play-summary-card,
  .dash-menu-section,.dash-submenu,.dash-summary-modal,.guide-step,.guide-note,.guide-visual,
  .p41-panel,.p43-panel,.p44-panel,.p35AccuracyPanel,.p35SummaryCard,
  [class$="-panel"],[class$="Panel"],[class*="-panel "],[class*="Panel "],
  [class$="-card"],[class$="Card"],[class*="-card "],[class*="Card "],
  [class$="-box"],[class$="Box"],[class*="-box "],[class*="Box "]
) {
  color: var(--soft-text) !important;
  background: var(--soft-surface) !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow-small) !important;
}
html.lotto-soft-light :where(.latest-group-head,.p41-panel-head,.section-head,[class$="-head"],[class$="Head"]) {
  color: var(--soft-text) !important;
  background: var(--soft-surface-3) !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light :where(.latest-row,.p43-row,.p35AccRow,.p38-history-row,.formula-row,.history-row,.result-row,[class$="-row"]) {
  color: var(--soft-text) !important;
  background: #fbfdfb !important;
  border-color: #dfe5e1 !important;
  box-shadow: none !important;
}
html.lotto-soft-light :where(.latest-row:nth-child(even),.p43-row:nth-child(even),.p35AccRow:nth-child(even)) { background: #f4f8f5 !important; }
html.lotto-soft-light :where(.dash-menu-card,.p43-card,.p44-card,.p35Card,.p35AccCard) {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
}
html.lotto-soft-light :where(.dash-menu-card:hover,.dash-menu-card.dash-primary-card:hover) { background: #f4faf6 !important; border-color: var(--soft-line-strong) !important; }
html.lotto-soft-light :where(.dash-menu-label,.latest-row-name,.latest-group-title,.p35Title2,.p35Label2) { color: var(--soft-text) !important; -webkit-text-fill-color: var(--soft-text) !important; }
html.lotto-soft-light :where(.latest-row-date,.latest-group-meta,.latest-status,.muted,[class$="-muted"]) { color: var(--soft-muted) !important; }

/* Legacy formula modules use the old deep-* palette directly. Repaint every
   major surface while preserving green/red/blue number chips as accents. */
html.lotto-soft-light :where(
  .compare-control,.compare-col,.heatmap-control,.heat-cell,.heat-sys-box,
  .weight-control,.engine-box,.column,.hm-modal-eng-row,.q-engine-box,
  .super-fusion,.streak-card,.combo-set,.gdc,.b-match,.wi-card,.sp-card,
  .chain-step,.bt-card,.vision-ai-box,.vision-top5-box,.vision-score-section,
  .vision-draw-card,.vision-review-box,.vision-review-table td,
  .claude-result-panel,#claudeChatLog,.p5-section,.p5-formula-card,
  .p6-section,.p8-section,.p9-section,.p10-section,#mainPage14 .p14-card,
  .retro-strategy-card,#p27Stats .p27Stat,#p27TopPairs .p27TopSection,
  #p27Sets,.p27WarnPanel,#p27Grid .p27Card,.p29MiniSummary,
  #p29Grid .p29Card,#p30Grid .p29Card,.p33PairCard,.p33Card,.p34Source,
  #p32List .p32Rec,#p32List .p32RecWin,.p29Group,#p29Summary,#p30Summary,
  #p29Stats .p29Stat,#p30Stats .p29Stat,#p34Stats .p34Stat,#p34Summary,
  #p33Stats .p33Stat,.p33Box,.p33Group
) {
  color: var(--soft-text) !important;
  background: var(--soft-surface) !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
}
html.lotto-soft-light :where(
  .hm-modal-close,.hm-modal-sub,.hm-modal-eng-name,.hm-modal-eng-pair,.hm-modal-empty,
  .meter-title,.label-sm,.chip-sep,.col-header,.ai-tag,.ai-suggest,.panel-label,
  .retro-panel-title,.play-summary-title,.latest-row-name,.latest-group-title,
  .latest-group-meta,.latest-status,.latest-sync-sub,.p29Title,.p29Name,.p29Idx,
  .play-note,.guide-copy,.guide-step p,.guide-note p,.guide-note li,.latest-row-date,
  .p30GroupHotMeta,.p19-title,.p19-grid-title,.p34SourceTitle,.p34Meta,
  .p33Title,.p33PairMeta,.p33GroupTitle,.p33Name
) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}
html.lotto-soft-light :where(.score-row .bar-wrap,.q-bar-wrap,.conf-bar-outer,.tail3-bar-wrap,.sp-bar,.cmd-bar-outer,.heat-cell .hc-bar) {
  background: #dce9e3 !important;
}
html.lotto-soft-light :where(.latest-search-input,.latest-search-count,.latest-filter-btn,#lottoDropBtn,#lottoDropList,.lotto-opt,.p14-lotto-select,.p14-lotto-badge,#p29Wrap .p29Toolbar input,#p30Wrap .p29Toolbar input,#p27Wrap .p27Toolbar input,#p33Wrap .p33Toolbar input,.latest-use-copy,.latest-chip,.guide-chip,.guide-date-box,.guide-input,.guide-example,.guide-input-rule,.play-empty) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
  background: #edf5f0 !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light :where(.lotto-modal-panel,.guide-body,#dashUsageGuide .guide-body,#dashUsageGuide.dash-submenu.dash-summary-modal.show) {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light #dashUsageGuide :where(.guide-hero,.guide-step,.guide-note,.guide-visual,.guide-summary-panel,.guide-input-rule,.guide-example,.guide-date-box) {
  color: var(--soft-text) !important;
  background: #f4f8f5 !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light #dashUsageGuide :where(.guide-title,.guide-step-title,.guide-summary-title,.guide-kicker,.guide-copy,.guide-step p,.guide-note p,.guide-note li) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}

html.lotto-soft-light .lotto-standalone-group-host,
html.lotto-soft-light .lotto-group-host,
html.lotto-soft-light .lgs-panel,
html.lotto-soft-light .lgs-options-wrap,
html.lotto-soft-light .p41-lgs-panel {
  color: var(--soft-text) !important;
  background: rgba(255, 254, 251, .96) !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow-small) !important;
}
html.lotto-soft-light .lgs-panel-head { color: var(--soft-text) !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }
html.lotto-soft-light .lgs-panel-head * { color: var(--soft-text) !important; -webkit-text-fill-color: var(--soft-text) !important; }
html.lotto-soft-light .lgs-option { box-shadow: 0 3px 9px rgba(29, 61, 51, .08) !important; }
html.lotto-soft-light .lgs-empty { color: var(--soft-muted) !important; background: #f7faf7 !important; }
html.lotto-soft-light .lgs-sync-button.secondary { color: #3f4f49 !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }
html.lotto-soft-light .lgs-sync-button.primary { color: #fff !important; background: var(--soft-green) !important; border-color: var(--soft-green) !important; }
html.lotto-soft-light .lgs-sync-button > * { color: inherit !important; -webkit-text-fill-color: currentColor !important; }

/* Generated Summary Numbers (page 4) and Analysis Summary (page 35). */
html.lotto-soft-light #page-main #dashP4SummarySlot {
  color: var(--soft-text) !important;
  background: linear-gradient(155deg, #ffffff 0%, #f3f8f5 100%) !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow) !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #codexP4TopDateRow { border-bottom-color: var(--soft-line) !important; }
html.lotto-soft-light #page-main #dashP4SummarySlot :where(#p4DateDisplay,#p4LottoName) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
  background: #edf5f0 !important;
  border-color: var(--soft-line-strong) !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid > div:not(#p4ShareBtnWrap) {
  color: var(--soft-text) !important;
  background: #f7faf7 !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid > div:not(#p4ShareBtnWrap) > span {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid [style*="color:#9ca3af"] { color: var(--soft-muted) !important; }
html.lotto-soft-light #page-main #dashP4SummarySlot #p4ShareBtnWrap { border-top-color: var(--soft-line) !important; }
html.lotto-soft-light #page-main #dashP4SummarySlot #p4ShareBtnWrap button {
  color: #3f4f49 !important;
  -webkit-text-fill-color: #3f4f49 !important;
  background: #edf5f0 !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4ShareBtnWrap button * {
  color: #3f4f49 !important;
  -webkit-text-fill-color: #3f4f49 !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4ShareBtnWrap button svg {
  stroke: currentColor !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4ShareBtnWrap button:hover { background: #e6f4ea !important; border-color: var(--soft-line-strong) !important; }

html.lotto-soft-light #mainPage35 .p35SummaryCard {
  color: var(--soft-text) !important;
  background: linear-gradient(155deg, #ffffff 0%, #f3f8f5 100%) !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow) !important;
}
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35SummaryHead { border-bottom-color: var(--soft-line) !important; }
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35InlineMeta span {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
  background: #e6f4ea !important;
  border-color: var(--soft-line-strong) !important;
}
html.lotto-soft-light #mainPage35 .p35SummaryCard > .p35Section2,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35DenSection {
  color: var(--soft-text) !important;
  background: #f7faf7 !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
}
html.lotto-soft-light #mainPage35 .p35SummaryCard :where(.p35Label2,.p35Title2) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35DrillLine2 { background: transparent !important; border: 0 !important; box-shadow: none !important; }

/* Inline legacy sections that otherwise keep white text on a pale card. */
html.lotto-soft-light :where(#ov-nodata,#ov-content,#ov-content [style*="color:#888"],#ov-content [style*="color:#444"]) { color: var(--soft-muted) !important; }
html.lotto-soft-light #ov-content > div {
  color: var(--soft-text) !important;
  background: #f7faf7 !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light #page-overview.tab-page {
  color: var(--soft-text) !important;
  background: transparent !important;
}
html.lotto-soft-light #page-overview > div { color: var(--soft-text) !important; }
html.lotto-soft-light #page-overview > div > div:first-child > div {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}
html.lotto-soft-light #page-overview > div > div:first-child > div:last-child { color: var(--soft-muted) !important; }
html.lotto-soft-light #page-overview #ov-content > div > div:first-child:not(#ov-balls):not(#ov-bars):not(#ov-sources) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
}
html.lotto-soft-light #page-overview #ov-balls > div > span { color: var(--soft-muted) !important; -webkit-text-fill-color: var(--soft-muted) !important; }
html.lotto-soft-light #page-overview #ov-balls > div > div {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 8px 18px rgba(8, 122, 100, .18) !important;
}
html.lotto-soft-light #page-overview #ov-bars > div > div {
  background: #dce9e3 !important;
}
html.lotto-soft-light #page-overview #ov-bars > div > div > div { background: var(--soft-green) !important; }
html.lotto-soft-light #page-overview #ov-sources > div {
  color: #3f4f49 !important;
  background: #edf5f0 !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light #page-overview #ov-sources > div * {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}
html.lotto-soft-light #page-overview #ov-legend { color: var(--soft-muted) !important; }

html.lotto-soft-light #mainPage45 {
  --nl-bg: #f3f7f4;
  --nl-panel: #ffffff;
  --nl-panel-2: #f4f8f5;
  --nl-line: #dfe5e1;
  --nl-text: #173b32;
  --nl-muted: #5b6a64;
  color: var(--soft-text) !important;
  background: linear-gradient(180deg, #f9fbf9, #eef5f0) !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-hero,.nl-stats,.nl-manual,.nl-tabs,.nl-pane,.nl-source,.nl-generated,.nl-control-card,.nl-set,.nl-compare-table,.nl-basket-box) {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow-small) !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-source-head,.nl-section-head,.nl-table-head,.nl-set-metrics span) { color: var(--soft-text) !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }
html.lotto-soft-light #mainPage45 :where(.nl-table-row,.nl-generated,.nl-control-card,.nl-set) { background: #f9fbf9 !important; }
html.lotto-soft-light #mainPage45 :where(.nl-tabs button,.nl-quick button,.nl-set-actions button,.nl-clear-exclude) { color: #3f4f49 !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }
html.lotto-soft-light #mainPage45 .nl-tabs button.active { color: #fff !important; background: var(--soft-green) !important; border-color: var(--soft-green) !important; }
html.lotto-soft-light #mainPage45 .nl-empty,
html.lotto-soft-light #mainPage45 .nl-empty-inline { color: var(--soft-muted) !important; }.lai-stats,.lai-tabs,.lai-card,.lai-chat,.lai-empty,.lai-lotto,.lai-source,.lai-rank,.lai-chat-log,.lai-explain) {
  color: var(--soft-text) !important;
  background: #fffefb !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow-small) !important;
}.lai-message.assistant) { color: var(--soft-text) !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }.lai-quick button) { color: #31584d !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }.lai-chat-empty,.lai-hero p,.lai-card-head span,.lai-chat-head p,.lai-rank>small) { color: var(--soft-muted) !important; }

html.lotto-soft-light :where(.modal,.overlay,.dialog,[role="dialog"],.vip-access-dialog) { color: var(--soft-text) !important; }
html.lotto-soft-light :where(.modal-content,.dialog-content,.vip-access-card,.hm-modal-content) {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  border-color: var(--soft-line) !important;
  box-shadow: 0 24px 60px rgba(37, 70, 58, .16) !important;
}
html.lotto-soft-light .vip-access-card h3,
html.lotto-soft-light .vip-access-card p { color: var(--soft-text) !important; }
html.lotto-soft-light .vip-access-close { color: #3f4f49 !important; background: #edf5f0 !important; border-color: var(--soft-line) !important; }
html.lotto-soft-light :where(.guide-disclaimer,.warning,.warn) { color: #72571e !important; background: var(--soft-gold-pale) !important; border-color: #ead8a1 !important; }

html.lotto-soft-light * { scrollbar-color: #bfe3cb transparent !important; }
html.lotto-soft-light *::-webkit-scrollbar-thumb { background: #bfe3cb !important; }
html.lotto-soft-light *::-webkit-scrollbar-track { background: transparent !important; }

@media (max-width: 900px) {
  .lotto-theme-toggle { min-width: 40px !important; padding-inline: 8px !important; }
  .lotto-theme-toggle b { display: none !important; }
  #smartDock .smart-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
  #smartDock .lotto-theme-toggle { grid-column: 1 !important; grid-row: 1 !important; }
  #smartDock .smart-btn.primary { grid-column: 2 !important; grid-row: 1 !important; }
  #smartDock .smart-btn.ghost { grid-column: 3 !important; grid-row: 1 !important; }
  #smartDock .smart-btn.nl-launcher { grid-column: 1 !important; grid-row: 2 !important; }
  #smartDock .smart-btn.lai-launcher { grid-column: 2 / 4 !important; grid-row: 2 !important; }
  html.lotto-soft-light body { background: linear-gradient(180deg, #fafcf9 0%, #edf4ef 100%) !important; }
}

@media (max-width: 620px) {
  .lotto-theme-toggle { min-width: 38px !important; height: 36px !important; padding: 0 !important; }
  .lotto-theme-toggle span { font-size: .95rem; }
  html.lotto-soft-light :where(.top-control,.latest-sync-card,.latest-selected-card,.latest-group-card,.dash-menu-section,.p41-panel,.p43-panel,.p44-panel) { box-shadow: 0 4px 12px rgba(37, 70, 58, .05) !important; }
}

@media (hover: none), (pointer: coarse) {
  html.lotto-soft-light :where(.card,.panel,.box,.section) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* Soft-light v2: one cohesive neutral-blue palette across the shell and the
   embedded formula app. Dark emerald is reserved for the green theme only. */
html.lotto-soft-light body,
html.lotto-soft-light body.light-theme {
  color: #22302b !important;
  background:
    radial-gradient(circle at 50% -12%, rgba(133, 164, 190, .18), transparent 38%),
    linear-gradient(180deg, #f7f8f7 0%, #eef0ef 54%, #e8ebe9 100%) !important;
}
html.lotto-soft-light body::after {
  background: radial-gradient(ellipse 760px 380px at 50% 0, rgba(111, 151, 184, .10), transparent 72%) !important;
}

html.lotto-soft-light body #appSidebar,
html.lotto-soft-light body .sidebar,
html.lotto-soft-light body .side-menu,
html.lotto-soft-light body #fb_login_bar,
html.lotto-soft-light body .app-header,
html.lotto-soft-light body .page-switch-bar,
html.lotto-soft-light body .tab-bar {
  color: #22302b !important;
  background: rgba(251, 252, 253, .98) !important;
  border-color: #dfe3e0 !important;
  box-shadow: 8px 0 24px rgba(30, 42, 36, .08) !important;
}
html.lotto-soft-light body #appSidebar :where(.sb-group-hdr,.sb-label,.sb-btn) {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
}
html.lotto-soft-light body #appSidebar .sb-group-hdr { background: #f7f8f7 !important; }
html.lotto-soft-light body #appSidebar .sb-btn:hover {
  color: #009c41 !important;
  background: #f1f3f2 !important;
}
html.lotto-soft-light body #appSidebar .sb-btn.sb-active,
html.lotto-soft-light body #appSidebar .sb-btn.active {
  color: #074e25 !important;
  background: #e6f4ea !important;
  border-color: #c3cac6 !important;
}

html.lotto-soft-light #smartDock,
html.lotto-soft-light #smartDock .smart-dock-inner,
html.lotto-soft-light #smartDock .smart-brand,
html.lotto-soft-light #smartDock .smart-actions {
  background: rgba(251, 252, 253, .98) !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light #smartDock :where(.smart-lotto-btn,.smart-input,.smart-btn.ghost,.smart-pae-entry) {
  color: #22302b !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light #smartDockInput {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  caret-color: #009c41 !important;
  opacity: 1 !important;
}
html.lotto-soft-light #smartDockInput::placeholder {
  color: #88938f !important;
  -webkit-text-fill-color: #88938f !important;
  opacity: 1 !important;
}
html.lotto-soft-light #smartDock :where(.smart-btn.nl-launcher,.smart-btn.lai-launcher) {
  color: #074e25 !important;
  background: #e6f4ea !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light #smartDock .smart-btn.primary,
html.lotto-soft-light .lgs-sync-button.primary {
  color: #fff !important;
  background: #009c41 !important;
  border-color: #009c41 !important;
  box-shadow: 0 5px 14px rgba(0, 156, 65, .16) !important;
}
html.lotto-soft-light .lgs-sync-button.secondary {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  background: #f7f8f7 !important;
  border-color: #dfe3e0 !important;
  box-shadow: 0 4px 12px rgba(30, 42, 36, .06) !important;
}

html.lotto-soft-light .lotto-standalone-group-host,
html.lotto-soft-light .lotto-group-host,
html.lotto-soft-light .lgs-panel,
html.lotto-soft-light .lgs-options-wrap,
html.lotto-soft-light .p41-lgs-panel {
  background: rgba(255, 255, 255, .97) !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light .lgs-panel-head { background: #f1f3f2 !important; }
html.lotto-soft-light .lgs-group { color: #22302b !important; border-color: #dfe3e0 !important; box-shadow: none !important; }
html.lotto-soft-light .lgs-group.thai { background: #edf4f1 !important; }
html.lotto-soft-light .lgs-group.lao { background: #f1f3f2 !important; }
html.lotto-soft-light .lgs-group.hanoi { background: #fff0f1 !important; }
html.lotto-soft-light .lgs-group.stock { background: #f1f3f2 !important; }
html.lotto-soft-light .lgs-group.malaysia,
html.lotto-soft-light .lgs-group.malay { background: #fff6e5 !important; background-image: none !important; }
html.lotto-soft-light .lgs-group :where(.lgs-label,.lgs-count) {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  text-shadow: none !important;
}
html.lotto-soft-light .lgs-group[aria-selected="true"] {
  border-color: #009c41 !important;
  box-shadow: 0 0 0 3px rgba(0, 156, 65, .16) !important;
}
html.lotto-soft-light .lgs-option {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  background: linear-gradient(180deg, #ffffff, #f1f3f2) !important;
  border-color: #dfe3e0 !important;
  box-shadow: 0 3px 9px rgba(30, 42, 36, .07) !important;
}
html.lotto-soft-light .lgs-option:hover { background: #f1f3f2 !important; border-color: #12ad52 !important; }
html.lotto-soft-light .lgs-option[aria-selected="true"],
html.lotto-soft-light .lgs-option.active,
html.lotto-soft-light .lgs-option.is-active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #009c41 !important;
  border-color: #074e25 !important;
  box-shadow: 0 0 0 3px rgba(0, 156, 65, .15) !important;
}

html.lotto-soft-light #page-main #dashP4SummarySlot,
html.lotto-soft-light #mainPage35 .p35SummaryCard {
  background: linear-gradient(155deg, #fff 0%, #f7f8f7 100%) !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid > div:not(#p4ShareBtnWrap),
html.lotto-soft-light #mainPage35 .p35SummaryCard > .p35Section2,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35DenSection {
  background: #f7f8f7 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid [style*="background:#047857"],
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid [style*="background: #047857"],
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Digit2.summary-hot,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Digit2.summary-win,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Pair2.drill-green,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Triple2 {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #009c41 !important;
  border-color: #009c41 !important;
  box-shadow: 0 5px 13px rgba(0, 156, 65, .18) !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid [style*="color:#0d7a38"] {
  color: #009c41 !important;
  -webkit-text-fill-color: #009c41 !important;
}

html.lotto-soft-light #mainPage45{
  --nl-bg: #eef0ef;
  --nl-panel: #ffffff;
  --nl-panel-2: #f7f8f7;
  --nl-line: #dfe3e0;
  --nl-text: #22302b;
  --nl-muted: #5b6a64;
  --lai-bg: #eef0ef;
  --lai-panel: #ffffff;
  --lai-panel-2: #f7f8f7;
  --lai-line: #dfe3e0;
  --lai-text: #22302b;
  --lai-muted: #5b6a64;
  background: linear-gradient(180deg, #f7f8f7, #f1f3f2) !important;
}

/* The membership shell is outside the formula iframe, so it receives the same
   class from soft-light-theme.js and must be painted separately. */
html.lotto-soft-light body.app-gate { background: #f1f3f2 !important; }
html.lotto-soft-light body.app-gate .app-topbar {
  color: #22302b !important;
  background: rgba(251, 252, 253, .98) !important;
  border-color: #dfe3e0 !important;
  box-shadow: 0 5px 16px rgba(30, 42, 36, .08) !important;
}
html.lotto-soft-light body.app-gate .app-topbar .top-actions a {
  color: #22302b !important;
  background: #f7f8f7 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light body.app-gate .app-frame-wrap { background: #f1f3f2 !important; }
html.lotto-soft-light body.app-gate .formula-frame { background: #eef0ef !important; border-color: #dfe3e0 !important; }

html.lotto-soft-light * { scrollbar-color: #c3cac6 transparent !important; }
html.lotto-soft-light *::-webkit-scrollbar-thumb { background: #c3cac6 !important; }

html.lotto-soft-light :where(
  [style*="background:#047857"],
  [style*="background: #047857"],
  [style*="background:#08745f"],
  [style*="background:#066d57"],
  [style*="background:#0f766e"],
  [style*="background:#0f8f70"]
) {
  background: #009c41 !important;
  border-color: #009c41 !important;
  box-shadow: 0 5px 13px rgba(0, 156, 65, .18) !important;
}
html.lotto-soft-light :where(
  [style*="color:#047857"],
  [style*="color: #047857"],
  [style*="color:#08745f"],
  [style*="color:#066d57"],
  [style*="color:#0f766e"]
) {
  color: #009c41 !important;
  -webkit-text-fill-color: #009c41 !important;
}
html.lotto-soft-light :where(
  [style*="background:#f0fdf4"],
  [style*="background: #f0fdf4"],
  [style*="background:#ecfdf5"],
  [style*="background: #ecfdf5"]
) {
  background: #f7f8f7 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light #page-overview #ov-balls > div > div {
  background: #009c41 !important;
  box-shadow: 0 6px 15px rgba(0, 156, 65, .18) !important;
}
html.lotto-soft-light body #mainPage1 #page-main .top-control {
  background: #fff !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
  box-shadow: 0 10px 26px rgba(30, 42, 36, .08) !important;
}
html.lotto-soft-light body .lgs-panel-title,
html.lotto-soft-light body .lgs-panel-count {
  background: transparent !important;
  background-image: none !important;
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4NoData {
  color: #5b6a64 !important;
  background: #f7f8f7 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4NoData * {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
  text-shadow: none !important;
}

@media (max-width: 900px) {
  html.lotto-soft-light body { background: linear-gradient(180deg, #f7f8f7 0%, #f1f3f2 100%) !important; }
}

/* Soft-light v10 — iOS grouped appearance.
   Keep the dark emerald theme untouched; these rules only apply after the
   user enables the soft-light mode. */
html.lotto-soft-light {
  --soft-bg: #eef0ef;
  --soft-surface: #ffffff;
  --soft-surface-2: #f7f8f7;
  --soft-line: #e3e6e4;
  --soft-line-strong: #c3cac6;
  --soft-text: #123a32;
  --soft-muted: #6e6e73;
  --soft-green: #009c41;
  --soft-shadow: 0 8px 24px rgba(30, 42, 36, .08);
  --soft-shadow-small: 0 2px 8px rgba(30, 42, 36, .06);
}
html.lotto-soft-light body,
html.lotto-soft-light body.light-theme,
html.lotto-soft-light #mainPage45{
  color: var(--soft-text) !important;
  background: var(--soft-bg) !important;
  background-image: none !important;
}
html.lotto-soft-light body::after { display: none !important; }

/* Stock/lottery choices: descendants had legacy white text, making the names
   look missing on the white iOS buttons. */
html.lotto-soft-light .lgs-panel,
html.lotto-soft-light .lgs-options-wrap,
html.lotto-soft-light .lotto-standalone-group-host,
html.lotto-soft-light .lotto-group-host,
html.lotto-soft-light .p41-lgs-panel {
  color: var(--soft-text) !important;
  background: var(--soft-surface) !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow-small) !important;
}
html.lotto-soft-light .lgs-panel-head {
  color: var(--soft-text) !important;
  background: #e8ebe9 !important;
  border-color: var(--soft-line) !important;
}
html.lotto-soft-light .lgs-panel-head *,
html.lotto-soft-light .lgs-option,
html.lotto-soft-light .lgs-option * {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  text-shadow: none !important;
}
html.lotto-soft-light .lgs-option {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #dfe3e0 !important;
  box-shadow: 0 1px 3px rgba(30, 42, 36, .05) !important;
}
html.lotto-soft-light .lgs-option:hover {
  background: #f1f3f2 !important;
  border-color: #12ad52 !important;
}
html.lotto-soft-light .lgs-option.selected,
html.lotto-soft-light .lgs-option[aria-selected="true"],
html.lotto-soft-light .lgs-option.active,
html.lotto-soft-light .lgs-option.is-active {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #e04b4b !important;
  box-shadow: 0 0 0 2px rgba(224, 75, 75, .18) !important;
}
html.lotto-soft-light .lgs-option.selected *,
html.lotto-soft-light .lgs-option[aria-selected="true"] *,
html.lotto-soft-light .lgs-option.active *,
html.lotto-soft-light .lgs-option.is-active * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
}

/* Soft-light v16 - final contrast pass for generated feature pages.
   Legacy renderers write white text with high-specificity selectors. Reset
   textual descendants to iOS label black, then restore white only on
   semantic coloured controls and number chips below. */
html.lotto-soft-light body :where(
  #retro_playsets_panel,#p35copy_retro_playsets_panel
) :where(h1,h2,h3,h4,h5,h6,p,span,b,strong,small,em,label,legend,li,td,th,pre,code,summary) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}

/* Number Lab: no dark input/picker panels remain in light mode. */
html.lotto-soft-light body #mainPage45 :where(.nl-lotto,.nl-manual,.nl-manual label,.nl-pane,.nl-best,.nl-basket-box) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage45 .nl-manual input {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #d6dbd8 !important;
}
html.lotto-soft-light body #mainPage45 .nl-tabs button:not(.active),
html.lotto-soft-light body #mainPage45 .nl-tabs button:not(.active) * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
}
html.lotto-soft-light body #mainPage45 :where(
  .nl-tabs button.active,.nl-lotto button,.nl-manual button:not(.ghost),
  .nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit
),
html.lotto-soft-light body #mainPage45 :where(
  .nl-tabs button.active,.nl-lotto button,.nl-manual button:not(.ghost),
  .nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}.lai-tabs,.lai-quick,.lai-chat-input,.lai-message.assistant) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #d1d1d6 !important;
}.lai-lotto button,.lai-chat-input button,.lai-message.user,
  .lai-hot>span,.lai-chip,.lai-set-grid b,.lai-rank>b
),.lai-lotto button,.lai-chat-input button,.lai-message.user,
  .lai-hot>span,.lai-chip,.lai-set-grid b,.lai-rank>b
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Today statistics: every card/header is white or grouped grey. */
  .p44-wrap,.p44-overview,.p44-metrics,.p44-metric,.p44-breakdown,.p44-break,
  .p44-toolbar,.p44-grid,.p44-card,.p44-empty,.p44-progress
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #d1d1d6 !important;
}
  .p44-result span,.p44-filter.active,.p44-refresh,.p44-status,.p44-badge.on
),
  .p44-result span,.p44-filter.active,.p44-refresh,.p44-status,.p44-badge.on
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Formula hub: all large containers become iOS cards with black headings. */
html.lotto-soft-light body #mainPage30 :where(
  .p30-role-stat,.p30-active-summary,.p30-role-section,.p30-role-grid,.p30-slim-group,
  .p30-slim-body,.p30-all-first-two,.p30-all-first-two-list,.p30-detail-list,
  .p30-detail-row,details.p30-details
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage30 :where(
  .p30-role-head,.p30-slim-head,.p30-all-first-two-head,details.p30-details summary
) {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage30 :where(
  .p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,
  .p30-detail-pair,.p30-top2-hot5-digit,.p30-formula-first-pair
),
html.lotto-soft-light body #mainPage30 :where(
  .p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,
  .p30-detail-pair,.p30-top2-hot5-digit,.p30-formula-first-pair
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Summary room and retrospective sets: remove remaining dark-green slabs. */
html.lotto-soft-light body #mainPage35 :where(
  #p35Wrap,.p35Hero2,.p35Grid2,.p35LeftStack,.p35RightStack,.p35Card2,
  .p35SummaryCard,.p35Top2Box,.p35OverviewComboCard,.p35OverviewDigitCard,
  .p35OverviewPairCard,.p35CoreArchiveCard,.p35PairFocusCard,.p35LinkDrillCard,
  .p35Section2,.p35DenSection,.p35RetroBody
),
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) :where(
  .playset-head,.playset-card,.playset-body,.playset-grid
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2),
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2) *,
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) .playset-chip,
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) .playset-chip * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Soft-light v18a - primary controls use iOS blue instead of legacy emerald. */
html.lotto-soft-light body #mainPage45 :where(.nl-lotto button,.nl-manual button:not(.ghost),.nl-tabs button.active),.lai-chat-input button,.lai-tabs button.active) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #0e8168 !important;
  background-image: none !important;
  border-color: #0e8168 !important;
}

/* Soft-light v22 — one calm iOS palette across legacy and generated pages. */
html.lotto-soft-light {
  --ios-page: #eef0ef;
  --ios-surface: #ffffff;
  --ios-surface-alt: #f1f3f2;
  --ios-line: #e3e6e4;
  --ios-label: #123a32;
  --ios-secondary: #6e6e73;
  --ios-blue: #009c41;
  --ios-blue-dark: #074e25;
  --ios-red: #b64242;
  --ios-amber: #9a6a18;
}

/* Generated pages do not all use main-page-wrap; include every mainPage root. */
html.lotto-soft-light body [id^="mainPage"] {
  color: var(--ios-label) !important;
  background-color: transparent !important;
  background-image: none !important;
}
html.lotto-soft-light body [id^="mainPage"] :where(h1,h2,h3,h4,h5,h6,p,label,legend,small,strong,em,span,li,td,th,pre,code,summary) {
  color: var(--ios-label) !important;
  -webkit-text-fill-color: var(--ios-label) !important;
  text-shadow: none !important;
}
html.lotto-soft-light body [id^="mainPage"] :where(
  section,article,.card,.panel,.box,.section,
  [class$="-card"],[class$="-panel"],[class$="-section"],
  [class*="-card "],[class*="-panel "],[class*="-section "]
) {
  color: var(--ios-label) !important;
  background-color: var(--ios-surface) !important;
  background-image: none !important;
  border-color: var(--ios-line) !important;
  box-shadow: 0 5px 16px rgba(31,41,55,.08) !important;
}
html.lotto-soft-light body [id^="mainPage"] :where(
  header,[class$="-head"],[class$="-header"],[class$="-titlebar"],
  [class*="-head "],[class*="-header "]
) {
  color: var(--ios-label) !important;
  background-color: var(--ios-surface-alt) !important;
  background-image: none !important;
  border-color: var(--ios-line) !important;
}
html.lotto-soft-light body [id^="mainPage"] :where(
  header,[class$="-head"],[class$="-header"],[class$="-titlebar"],
  [class*="-head "],[class*="-header "]
) * {
  color: var(--ios-label) !important;
  -webkit-text-fill-color: var(--ios-label) !important;
  text-shadow: none !important;
}

/* Formula history and generated formula cards. */
html.lotto-soft-light body #retro_formula_trust_panel,
html.lotto-soft-light body #p35copy_retro_formula_trust_panel,
html.lotto-soft-light body #retro_formula_trust_panel .trust-card,
html.lotto-soft-light body #p35copy_retro_formula_trust_panel .trust-card,
html.lotto-soft-light body #retro_result :where(.column,.retro-panel,.retro-insight,.retro-strategy-card) {
  color: var(--ios-label) !important;
  background: var(--ios-surface) !important;
  background-image: none !important;
  border-color: var(--ios-line) !important;
  box-shadow: 0 5px 16px rgba(31,41,55,.08) !important;
}
html.lotto-soft-light body #retro_formula_trust_panel :where(.trust-head,.trust-title,.trust-name,.trust-score,.trust-sub,.trust-meta,.trust-note),
html.lotto-soft-light body #p35copy_retro_formula_trust_panel :where(.trust-head,.trust-title,.trust-name,.trust-score,.trust-sub,.trust-meta,.trust-note),
html.lotto-soft-light body #retro_result :where(.col-header,.retro-panel-title,.retro-note,.retro-insight,.retro-strategy-card) {
  color: var(--ios-label) !important;
  -webkit-text-fill-color: var(--ios-label) !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #retro_formula_trust_panel .trust-sub,
html.lotto-soft-light body #retro_formula_trust_panel .trust-meta,
html.lotto-soft-light body #retro_formula_trust_panel .trust-note,
html.lotto-soft-light body #p35copy_retro_formula_trust_panel :where(.trust-sub,.trust-meta,.trust-note) {
  color: var(--ios-secondary) !important;
  -webkit-text-fill-color: var(--ios-secondary) !important;
}
html.lotto-soft-light body #retro_formula_trust_panel .trust-pick,
html.lotto-soft-light body #p35copy_retro_formula_trust_panel .trust-pick {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: var(--ios-blue) !important;
  border-color: var(--ios-blue) !important;
}
html.lotto-soft-light body #retro_formula_trust_panel .trust-card.hot,
html.lotto-soft-light body #p35copy_retro_formula_trust_panel .trust-card.hot {
  border-color: #b79a53 !important;
  box-shadow: 0 0 0 1px rgba(154,106,24,.13),0 5px 16px rgba(31,41,55,.08) !important;
}

/* Today's statistics: blue means hit, red means miss, amber means pending. */

/* Consistent semantic number tiles after the global dark-text reset. */
html.lotto-soft-light body [id^="mainPage"] :where(
  .p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,.p30-detail-pair,
  .p30-top2-hot5-digit,.p30-formula-first-pair,.p35Digit2,.p35Pair2,.p35Triple2,
  .p43-chip,.p43-cchip,.playset-chip,.trust-pick
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: var(--ios-blue) !important;
  background-image: none !important;
  border-color: var(--ios-blue) !important;
  text-shadow: none !important;
}
html.lotto-soft-light body [id^="mainPage"] :where(
  .p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,.p30-detail-pair,
  .p30-top2-hot5-digit,.p30-formula-first-pair,.p35Digit2,.p35Pair2,.p35Triple2,
  .p43-chip,.p43-cchip,.playset-chip,.trust-pick
) * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Mobile: selector + theme on row one; result + Analyze + Sync on row two. */
@media (max-width: 900px) {
  html body #smartDock .smart-dock-inner {
    position: relative !important;
    grid-template-columns: minmax(116px,38%) minmax(0,1fr) !important;
    column-gap: 7px !important;
  }
  #smartDock .smart-lotto-btn {
    padding-right: 90px !important;
  }
  #smartDock .smart-actions {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 7px !important;
  }
  #smartDock .smart-actions .smart-btn.primary {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  #smartDock .smart-actions .smart-btn.ghost {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  #smartDock .smart-actions :where(.smart-btn.nl-launcher,.smart-btn.lai-launcher) {
    display: none !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle {
    position: absolute !important;
    top: 5px !important;
    right: 8px !important;
    z-index: 3 !important;
    width: 76px !important;
    min-width: 76px !important;
    height: 32px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    border-radius: 11px !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle span {
    width: 19px !important;
    height: 19px !important;
    flex: 0 0 19px !important;
    font-size: .72rem !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle b {
    display: inline !important;
    font-size: .62rem !important;
  }
}
@media (max-width: 420px) {
  #smartDock .smart-dock-inner {
    grid-template-columns: minmax(106px,36%) minmax(0,1fr) !important;
  }
  #smartDock .smart-lotto-btn { padding-right: 82px !important; }
  #smartDock .smart-actions .lotto-theme-toggle {
    right: 7px !important;
    width: 70px !important;
    min-width: 70px !important;
    padding-inline: 6px !important;
  }
}

/* Soft-light v26 — close remaining legacy green surfaces and compact overflow. */
html.lotto-soft-light body :where(
  .latest-row,.p43-row,.p35AccRow,.p38-history-row,.formula-row,.history-row,
  [class*="history-row"],[class*="retro-row"],[class*="result-row"]
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body :where(
  .latest-row,.p43-row,.p35AccRow,.p38-history-row,.formula-row,.history-row,
  [class*="history-row"],[class*="retro-row"],[class*="result-row"]
):nth-child(even) {
  background-color: #f7f8f7 !important;
}

html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #d6dbd8 !important;
  border-radius: 15px !important;
  box-shadow: 0 4px 12px rgba(30, 42, 36,.06) !important;
  padding: 5px 9px !important;
  gap: 0 !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta span {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 5px 4px !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta span + span::before {
  content: "·";
  margin: 0 6px 0 2px;
  color: #88938f;
}

html.lotto-soft-light body #page-main #dashP4SummarySlot .codex-p4-lotto-pill {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #12ad52 !important;
  box-shadow: 0 4px 12px rgba(30, 42, 36,.06) !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot .codex-p4-lotto-pill span {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid [style*="background:#047857"],
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid [style*="background: #047857"],
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
  text-shadow: none !important;
}


html.lotto-soft-light body #mainPage30 :where(
  .p30-role-stat,.p30-active-summary,.p30-role-section,.p30-role-grid,
  .p30-slim-group,.p30-slim-body,.p30-all-first-two,.p30-detail-list,
  .p30-detail-row,details.p30-details
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: 0 4px 14px rgba(30, 42, 36,.06) !important;
}
html.lotto-soft-light body #mainPage30 :where(
  .p30-role-head,.p30-slim-head,.p30-all-first-two-head,details.p30-details summary
) {
  color: #123a32 !important;
  background-color: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}

@media (max-width: 900px) {
  html.lotto-soft-light body :where(#page-main,#dashHome,#dashP4SummarySlot,#mainPage35,#p35Wrap) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  html.lotto-soft-light body #page-main #dashP4SummarySlot,
  html.lotto-soft-light body #page-main #dashP4SummarySlot > div,
  html.lotto-soft-light body #page-main #dashP4SummarySlot #p4Content,
  html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid,
  html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid > div,
  html.lotto-soft-light body #mainPage35 :where(.p35Grid2,.p35SummaryCard,.p35Section2,.p35DrillGrid2,.p35DrillLine2) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35DrillLine2 {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  }
  html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35Pair2.drill-green {
    width: 100% !important;
    min-width: 0 !important;
  }
}
html.lotto-soft-light body #mainPage45 .nl-manual button.ghost {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #eef0ef !important;
  background-image: none !important;
  border-color: #d6dbd8 !important;
}

/* Soft-light v27 — targeted fixes for the remaining high-specificity legacy
   rules.  These selectors intentionally name each page so the green theme is
   untouched and generated cards keep their original layout semantics. */

/* Summary: the lottery name and date must be one clean iOS-style capsule. */
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35SummaryHead {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #d6dbd8 !important;
  box-shadow: 0 4px 12px rgba(30, 42, 36,.06) !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta :where(span,.lotto) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Pair-focus card: remove the last green shell and contain every number chip
   inside its grid track.  content-box + width:100% caused the right overlap. */
html.lotto-soft-light body #mainPage35 .p35PairFocusCard,
html.lotto-soft-light body #mainPage35 .p35PairFocusCard > .p35Section2 {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: 0 4px 14px rgba(30, 42, 36,.06) !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard :where(.p35DigitRow2,.p35Top2Grid) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard :where(.p35Digit2,.p35Pair2) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid {
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 8px !important;
  padding: 0 !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35DigitRow2 {
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
  gap: 7px !important;
  padding: 0 !important;
}

/* Playing formulas: no dark alternating history bars in the white theme. */
html.lotto-soft-light body #mainPage43 .p43-card .p43-row {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #f1f3f2 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #mainPage43 .p43-card .p43-row:nth-child(even) {
  background: #f7f8f7 !important;
}
html.lotto-soft-light body #mainPage43 .p43-card .p43-row :where(.p43-date,.p43-draw,.p43-pred) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}

/* Formula hub intro: replace the legacy green glass banner. */
html.lotto-soft-light body #mainPage30 #codexFormulaHubGuide.codex-hub-guide {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #e3e6e4 !important;
  box-shadow: 0 5px 16px rgba(30, 42, 36,.07) !important;
}
html.lotto-soft-light body #mainPage30 #codexFormulaHubGuide :where(.codex-hub-guide-title,.codex-hub-guide-sub) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}

/* Pair page: the ready-to-use set is a white card; blue number chips remain. */

@media (max-width: 640px) {
  html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid {
    gap: 6px !important;
  }
  html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35DigitRow2 {
    gap: 5px !important;
  }
}

/* Soft-light v32 — semantic next-draw warning and balanced accuracy header. */
html.lotto-soft-light body .codex-date-chip-main.is-next {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg,#a91f2d,#dc3545) !important;
  background-image: linear-gradient(135deg,#a91f2d,#dc3545) !important;
  border-color: #e36a74 !important;
  box-shadow: 0 7px 18px rgba(185,40,53,.20) !important;
}
html.lotto-soft-light body .codex-date-chip-main.is-next * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.lotto-soft-light body #mainPage35 .p35AccHead {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccTitle {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccSub {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent {
  color: #22302b !important;
  background: conic-gradient(#c92f3b calc(var(--p)*1%),#dfe3e0 0) !important;
  box-shadow: 0 0 0 1px #dfe3e0,0 6px 14px rgba(45,60,75,.12) !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent::before {
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px #f1f3f2 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent :where(span,small,b) {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent small {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
}

/* Historical result tile: keep the familiar blue result colour in light mode. */
html.lotto-soft-light body #mainPage35 .p35AccDraw,
html.lotto-soft-light body .p35SummaryCard .p35AccDraw {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(180deg,#009c41 0%,#009c41 100%) !important;
  background-image: linear-gradient(180deg,#009c41 0%,#009c41 100%) !important;
  border-color: #009c41 !important;
  box-shadow: 0 4px 11px rgba(38,101,145,.20) !important;
}
html.lotto-soft-light body #mainPage35 .p35AccDraw :where(.p35AccDrawLabel,.p35AccDrawResult,small,small span),
html.lotto-soft-light body .p35SummaryCard .p35AccDraw :where(.p35AccDrawLabel,.p35AccDrawResult,small,small span) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* Soft-light v33: these controls can be rendered in more than one summary
   host, so the contrast rule must not depend on dashboard ancestry. */
html.lotto-soft-light body #p4ShareBtnWrap button,
html.lotto-soft-light body #p4ShareBtnWrap button * {
  color: #3f4f49 !important;
  -webkit-text-fill-color: #3f4f49 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
html.lotto-soft-light body #p4ShareBtnWrap button {
  background: #edf5f0 !important;
  background-image: none !important;
  border-color: #dfe5e1 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #p4ShareBtnWrap button svg {
  color: #3f4f49 !important;
  stroke: #3f4f49 !important;
}
html.lotto-soft-light body #mainPage35 .p35RetroHead {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light body #mainPage35 :where(.p35RetroTitle,.p35RetroTitle *, .p35RetroSub,.p35RetroSub *) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Soft-light v43 — iPad retrospective fit, clearer hit/miss captions, and
   shared light surfaces for the membership payment and admin pages. */
@media (min-width: 621px) and (max-width: 1200px) {
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_top5.num-flex,
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel .formula-hot-row {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_top5 .retro-big-num,
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel .formula-hot-num {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 74px !important;
    padding-inline: 2px !important;
    box-sizing: border-box !important;
    font-size: clamp(1.45rem,3vw,2rem) !important;
    overflow: hidden !important;
  }
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_top5 .retro-big-num :where(.sub,small),
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel .formula-hot-num small {
    max-width: 100% !important;
    padding-inline: 1px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}
@media (min-width: 621px) and (max-width: 1024px) and (orientation: portrait) {
  html body #mainPage35#mainPage35 .p35RetroBody .retro-top-panel {
    grid-template-columns: minmax(0,1fr) !important;
  }
  html body #mainPage35#mainPage35 .p35RetroBody .retro-top-panel h3,
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_top5,
  html body #mainPage35#mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

  .p44-ring-label,.p44-count-line,.p44-metric span,.p44-break span,
  .p44-filter,.p44-status,.p44-badge
) {
  font-weight: 1000 !important;
}

html.lotto-soft-light body:has(.admin-shell),
html.lotto-soft-light body:has(.page-shell) {
  --bg: #eef0ef;
  --panel: #ffffff;
  --panel-2: #f7f8f7;
  --line: #e3e6e4;
  --line-strong: #c3cac6;
  --text: #123a32;
  --muted: #5f6368;
  color: #123a32 !important;
  background: linear-gradient(180deg,#fafcfb 0%,#f1f3f2 100%) !important;
}
html.lotto-soft-light body:has(.admin-shell) .topbar,
html.lotto-soft-light body:has(.page-shell) .topbar {
  color: #123a32 !important;
  background: rgba(255,255,255,.94) !important;
  border-color: #e3e6e4 !important;
  box-shadow: 0 4px 16px rgba(40,50,60,.07) !important;
}
html.lotto-soft-light body:has(.admin-shell) :where(.glass-panel,.stat-card,.admin-plan-row,.admin-toggle-row,.payment-automation-status,td),
html.lotto-soft-light body:has(.page-shell) :where(.glass-panel,.plan-card,.qr-box,.status-item,.selected-plan-box,.payment-legal-note) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: 0 7px 22px rgba(40,50,60,.07) !important;
}
html.lotto-soft-light body:has(.admin-shell) :where(h1,h2,h3,p,label,th,td,.muted,.stat-card span,.payment-automation-status small,.admin-date-cell,.admin-date-cell b,.payment-member-cell b,.payment-member-cell small),
html.lotto-soft-light body:has(.page-shell) :where(h1,h2,h3,p,label,.muted,.price,.price small,.bank-line,.bank-line b,.pay-title,.pay-value,.status-item small,.selected-plan-box b,.member-legal-footer) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body:has(.admin-shell) :where(input,select),
html.lotto-soft-light body:has(.page-shell) :where(input,select) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #c3cac6 !important;
}
html.lotto-soft-light body:has(.admin-shell) :where(.top-actions a,.ghost-btn,.admin-section-tab,.admin-user-filter),
html.lotto-soft-light body:has(.page-shell) :where(.top-actions a,.ghost-btn) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #f7f8f7 !important;
  border-color: #d6dbd8 !important;
}
html.lotto-soft-light body:has(.admin-shell) :where(.admin-section-tab.active,.admin-user-filter.active,.primary-btn,.copy-account-btn),
html.lotto-soft-light body:has(.page-shell) :where(.primary-btn,.copy-account-btn) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg,#009c41,#009c41) !important;
  border-color: #009c41 !important;
}
html.lotto-soft-light body:has(.admin-shell) :where(.admin-section-tab.active,.admin-user-filter.active,.primary-btn,.copy-account-btn) *,
html.lotto-soft-light body:has(.page-shell) :where(.primary-btn,.copy-account-btn) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.lotto-soft-light body:has(.page-shell) :where(.payment-approval-warning,.danger-btn,.badge.rejected,.badge.expired) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.lotto-soft-light body:has(.page-shell) .lotto-theme-toggle,
html.lotto-soft-light body:has(.admin-shell) .lotto-theme-toggle {
  flex: 0 0 auto !important;
}

/* Soft-light v44 — mobile membership/admin readability and overflow guard. */
html.lotto-soft-light body:has(.page-shell) :where(
  .plans-note,.plan-card h3,.plan-badges b,.selected-plan-box span,
  .selected-plan-box strong,.payment-legal-note,.payment-legal-note a,
  .site-legal-links a,.contact-link,.bank-line,.bank-line b,
  .status-item,.status-item small
) {
  color: #30343a !important;
  -webkit-text-fill-color: #30343a !important;
  text-shadow: none !important;
}
html.lotto-soft-light body:has(.page-shell) :where(.plan-card.active,.plan-card.recommended) {
  background: #ffffff !important;
  border-color: #c7a53b !important;
}
html.lotto-soft-light body:has(.page-shell) .plan-badges b {
  color: #624900 !important;
  -webkit-text-fill-color: #624900 !important;
  background: #fff3bd !important;
  border-color: #d5b956 !important;
}
html.lotto-soft-light body:has(.page-shell) :where(.badge.active,.badge.approved,.approval-notice) {
  color: #074e25 !important;
  -webkit-text-fill-color: #074e25 !important;
  background: #e6f4ea !important;
  border-color: #bfe3cb !important;
}
html.lotto-soft-light body:has(.page-shell) .approval-notice :where(b,span) {
  color: #074e25 !important;
  -webkit-text-fill-color: #074e25 !important;
}

@media (max-width: 560px) {
  html.lotto-soft-light body:has(.admin-shell),
  html.lotto-soft-light body:has(.page-shell) {
    overflow-x: hidden !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar:not(.app-topbar),
  html.lotto-soft-light body:has(.page-shell) .topbar:not(.app-topbar) {
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 12px !important;
    gap: 9px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .brand-line.small,
  html.lotto-soft-light body:has(.page-shell) .topbar .brand-line.small {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .brand-line.small > div,
  html.lotto-soft-light body:has(.page-shell) .topbar .brand-line.small > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .brand-line.small :where(h1,p),
  html.lotto-soft-light body:has(.page-shell) .topbar .brand-line.small :where(h1,p) {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .top-actions,
  html.lotto-soft-light body:has(.page-shell) .topbar .top-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .top-actions .lotto-theme-toggle,
  html.lotto-soft-light body:has(.page-shell) .topbar .top-actions .lotto-theme-toggle {
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .top-actions .lotto-theme-toggle b,
  html.lotto-soft-light body:has(.page-shell) .topbar .top-actions .lotto-theme-toggle b {
    display: none !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .topbar .top-actions > :not(.lotto-theme-toggle),
  html.lotto-soft-light body:has(.page-shell) .topbar .top-actions > :not(.lotto-theme-toggle) {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 38px !important;
    padding: 6px 5px !important;
    box-sizing: border-box !important;
    font-size: .7rem !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
  }
  html.lotto-soft-light body:has(.admin-shell) :where(.admin-shell,.admin-grid,.glass-panel,.form-stack,.admin-plan-row,.admin-toggle-row,.table-wrap),
  html.lotto-soft-light body:has(.page-shell) :where(.page-shell,.plan-grid,.pay-grid,.glass-panel,.payment-form,.status-box) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .table-wrap tr {
    gap: 0 !important;
    padding: 10px 11px !important;
    color: #123a32 !important;
    background: #ffffff !important;
    border: 1px solid #dfe3e0 !important;
    box-shadow: 0 5px 16px rgba(40,50,60,.06) !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .table-wrap td,
  html.lotto-soft-light body:has(.admin-shell) #usersTable td {
    grid-template-columns: minmax(76px,88px) minmax(0,1fr) !important;
    gap: 8px !important;
    min-width: 0 !important;
    padding: 7px 1px !important;
    color: #123a32 !important;
    -webkit-text-fill-color: #123a32 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #f1f3f2 !important;
    box-shadow: none !important;
    overflow-wrap: anywhere !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .table-wrap td:last-child,
  html.lotto-soft-light body:has(.admin-shell) #usersTable td:last-child {
    border-bottom: 0 !important;
  }
  html.lotto-soft-light body:has(.admin-shell) .table-wrap td::before {
    color: #5b6a64 !important;
    -webkit-text-fill-color: #5b6a64 !important;
    font-size: .7rem !important;
  }
  html.lotto-soft-light body:has(.admin-shell) #usersTable :where(.member-cell,.admin-grant,.table-actions) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html.lotto-soft-light body:has(.admin-shell) #usersTable :where(.admin-grant,.table-actions) :where(button,input) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Soft-light v37 — prevent dock controls and pair-result chips from
   overflowing their grid tracks in both green and light modes. */
@media (min-width: 901px) {
  html body #smartDock .smart-dock-inner {
    width: min(1180px,100%) !important;
    grid-template-columns: auto minmax(120px,1fr) minmax(110px,.9fr) minmax(280px,1.15fr) !important;
  }
  html body #smartDock .smart-actions {
    grid-template-columns: 68px 82px minmax(0,1fr) !important;
  }
  html body #smartDock .smart-actions .lotto-theme-toggle {
    min-width: 0 !important;
    padding-inline: 8px !important;
    gap: 5px !important;
    overflow: hidden !important;
  }
  html body #smartDock .smart-actions .lotto-theme-toggle b {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

html body #smartDock .smart-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html body #mainPage35 .p35PairFocusCard,
html body #mainPage35 .p35PairFocusCard > .p35Section2,
html body #mainPage35 .p35PairFocusCard :where(.p35DigitRow2,.p35Top2Grid) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
html body #mainPage35 .p35PairFocusCard .p35DigitRow2 {
  display: grid !important;
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
  gap: 8px !important;
}
html body #mainPage35 .p35PairFocusCard .p35Top2Grid {
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  column-gap: 10px !important;
  row-gap: 8px !important;
  padding: 1px !important;
}
html body #mainPage35 .p35PairFocusCard :where(.p35Digit2,.p35Pair2.ready-pair) {
  display: flex !important;
  inline-size: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  box-sizing: border-box !important;
  justify-self: stretch !important;
  overflow: hidden !important;
}
@media (max-width: 640px) {
  html body #mainPage35 .p35PairFocusCard .p35DigitRow2,
  html body #mainPage35 .p35PairFocusCard .p35Top2Grid {
    gap: 6px !important;
  }
  html body #mainPage35 .p35PairFocusCard :where(.p35Digit2,.p35Pair2.ready-pair) {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
}

/* Responsive layout v41 — preserve the requested two-column iPad landscape
   view and compact the summary without shrinking its number chips. */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  html body #mainPage43 .p43-grid.p43-grid-two-compact {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 8px !important;
  }
  html body #mainPage43 .p43-grid.p43-grid-two-compact > .p43-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

html body #mainPage35 .p35PairFocusCard .p35DigitRow2 {
  display: grid !important;
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 7px !important;
}
html body #mainPage35 .p35PairFocusCard .p35DigitRow2 > .p35Digit2 {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

@media (max-width: 1024px) {
  html body #mainPage35 .p35SummaryCard {
    padding: 8px !important;
  }
  html body #mainPage35 .p35SummaryCard > .p35Section2 {
    margin-top: 5px !important;
    padding: 6px 7px 7px !important;
  }
  html body #mainPage35 .p35SummaryCard > .p35Section2 > .p35Label2 {
    margin: 0 0 4px !important;
    line-height: 1.1 !important;
  }
  html body #mainPage35 .p35SummaryCard .p35DrillGrid2 {
    gap: 5px !important;
  }
  html body #mainPage35 .p35SummaryCard .p35DrillLine2 {
    gap: 6px !important;
  }
}
@media (max-width: 620px) {
  html body #mainPage35 .p35SummaryCard {
    padding: 7px !important;
  }
  html body #mainPage35 .p35SummaryCard > .p35Section2 {
    margin-top: 4px !important;
    padding: 5px 6px 6px !important;
  }
  html body #mainPage35 .p35SummaryCard > .p35Section2 > .p35Label2 {
    margin-bottom: 3px !important;
  }
  html body #mainPage35 .p35SummaryCard .p35DrillGrid2 {
    gap: 4px !important;
  }
}

/* Responsive and light-theme corrections v42. */
html body #mainPage35 .p35SummaryCard .p35WinSection .p35DigitRow2 {
  display: grid !important;
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 7px !important;
  overflow: hidden !important;
}
html body #mainPage35 .p35SummaryCard .p35WinSection .p35DigitRow2 > .p35Digit2.summary-win {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  box-sizing: border-box !important;
  justify-self: stretch !important;
  overflow: hidden !important;
}
@media (max-width: 620px) {
  html body #mainPage35 .p35SummaryCard .p35WinSection .p35DigitRow2 {
    gap: 5px !important;
    padding: 0 1px !important;
  }
}

@media (min-width: 761px) and (max-width: 1200px) {
  html body #mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel .formula-hot-row,
  html body #retro_formula_hot_panel .formula-hot-row {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 7px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html body #mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel .formula-hot-num,
  html body #retro_formula_hot_panel .formula-hot-num {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 74px !important;
    margin: 0 !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
    font-size: 2rem !important;
    overflow: hidden !important;
  }
  html body #mainPage35 .p35RetroBody #p35copy_retro_formula_hot_panel .formula-hot-num small,
  html body #retro_formula_hot_panel .formula-hot-num small {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

html.lotto-soft-light body #page-ai .top-control,
html.lotto-soft-light body #page-vision .top-control {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
  box-shadow: 0 6px 18px rgba(0, 156, 65,.08) !important;
}
html.lotto-soft-light body #page-ai .top-control h2,
html.lotto-soft-light body #page-vision .top-control h2 {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: none !important;
  background-image: none !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #page-ai .top-control p,
html.lotto-soft-light body #page-vision .top-control > p,
html.lotto-soft-light body #page-vision #visionImgCount,
html.lotto-soft-light body #page-vision .vision-paste-hint {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
}
html.lotto-soft-light body #page-ai #moduleToggle_aiDec {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #page-ai #moduleToggle_aiDec span {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
}
html.lotto-soft-light body #page-ai #moduleToggle_aiDec #moduleLabel_aiDec {
  color: #009c41 !important;
  -webkit-text-fill-color: #009c41 !important;
}
html.lotto-soft-light body #page-ai #aiInput {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #c3cac6 !important;
  box-shadow: inset 0 1px 2px rgba(31,41,55,.06) !important;
}
html.lotto-soft-light body #page-ai #aiInput::placeholder {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
  opacity: 1 !important;
}
html.lotto-soft-light body #page-ai button[onclick*="runAIDecision"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(0, 156, 65,.18) !important;
}
html.lotto-soft-light body #page-ai button[onclick*="ai_result"] {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
}

html.lotto-soft-light body #page-vision .vision-mode-bar {
  background: transparent !important;
}
html.lotto-soft-light body #page-vision .vision-mode-btn {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light body #page-vision .vision-mode-btn.active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  border-color: #074e25 !important;
}
html.lotto-soft-light body #page-vision .vision-drop,
html.lotto-soft-light body #page-vision .vision-drop:hover,
html.lotto-soft-light body #page-vision .vision-drop.drag-over {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border: 2px dashed #c3cac6 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #page-vision .vision-drop-text {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
}
html.lotto-soft-light body #page-vision .vision-drop-hint {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
}
html.lotto-soft-light body #page-vision .vision-paste-area {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #c3cac6 !important;
}
html.lotto-soft-light body #page-vision :where(#visionAnalyzeBtn,#vPasteAnalyzeBtn) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
  box-shadow: 0 4px 12px rgba(0, 156, 65,.18) !important;
}
html.lotto-soft-light body #page-vision #visionAnalyzeBtn:disabled {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
  opacity: 1 !important;
}

/* Soft-light v34 — formula labels are plain text, never pale-green marker
   strips. Keep only the cards and neutral count badges as visual containers. */
html.lotto-soft-light body #mainPage18 :where(h1,h2,.p18-card-label),
html.lotto-soft-light body #mainPage30 :where(.p30-stat-kicker,.p30-card-kicker) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage18 .p18-badge,
html.lotto-soft-light body #mainPage30 .p30-role-badge {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  background: #f7f8f7 !important;
  background-image: none !important;
  border: 1px solid #dfe3e0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Soft-light v33 — keep the lottery-history results clean and paper-white.
   This page used a translucent dark table, which became a muddy grey when the
   soft-light palette was enabled.  Scope the repaint to the result panel so
   the country-coloured lottery catalogue remains unchanged. */
html.lotto-soft-light body #mainPage41 .p41-panel:last-child,
html.lotto-soft-light body #mainPage41 .p41-results,
html.lotto-soft-light body #mainPage41 .p41-table-wrap,
html.lotto-soft-light body #mainPage41 .p41-table {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
}
html.lotto-soft-light body #mainPage41 .p41-panel:last-child > .p41-panel-head {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-bottom-color: #dfe3e0 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage41 .p41-selected {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
}
html.lotto-soft-light body #mainPage41 .p41-status {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
}
html.lotto-soft-light body #mainPage41 .p41-table-wrap {
  border-color: #dfe3e0 !important;
  box-shadow: 0 5px 16px rgba(45,60,75,.06) !important;
}
html.lotto-soft-light body #mainPage41 .p41-table thead,
html.lotto-soft-light body #mainPage41 .p41-table thead tr,
html.lotto-soft-light body #mainPage41 .p41-table th {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage41 .p41-table tbody tr,
html.lotto-soft-light body #mainPage41 .p41-table tbody tr:nth-child(odd) {
  background: #ffffff !important;
  background-image: none !important;
}
html.lotto-soft-light body #mainPage41 .p41-table tbody tr:nth-child(even) {
  background: #f7f8f7 !important;
  background-image: none !important;
}
html.lotto-soft-light body #mainPage41 .p41-table td {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: transparent !important;
  background-image: none !important;
  border-color: #f1f3f2 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage41 .p41-table td:nth-child(2) {
  color: #009c41 !important;
  -webkit-text-fill-color: #009c41 !important;
}
html.lotto-soft-light body #mainPage41 .p41-table td:nth-child(3) {
  color: #074e25 !important;
  -webkit-text-fill-color: #074e25 !important;
}

/* Mobile theme switch - readable capsule instead of the cramped icon-only box. */
@media (max-width: 900px) {
  #smartDock .smart-dock-inner {
    grid-template-columns: minmax(118px, 38%) minmax(0, 1fr) !important;
    column-gap: 7px !important;
  }
  #smartDock #smartDockInput.smart-input {
    min-width: 0 !important;
    padding-inline: 8px !important;
    font-size: .82rem !important;
    letter-spacing: .45px !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    border-radius: 13px !important;
    color: #ffffff !important;
    background: linear-gradient(145deg, #126f60, #075249) !important;
    border: 1px solid #2a907d !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 3px 9px rgba(0,35,29,.18) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle span {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(255,255,255,.14) !important;
    font-size: .82rem !important;
    line-height: 1 !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle b {
    display: inline !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: .68rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  html.lotto-soft-light #smartDock .smart-actions .lotto-theme-toggle {
    color: #5d4307 !important;
    background: linear-gradient(145deg, #fff8df, #f5e5a8) !important;
    border-color: #d5b956 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 3px 9px rgba(84,63,9,.13) !important;
  }
  html.lotto-soft-light #smartDock .smart-actions .lotto-theme-toggle span {
    color: #7a5700 !important;
    -webkit-text-fill-color: #7a5700 !important;
    background: rgba(255,255,255,.62) !important;
  }
}

@media (max-width: 420px) {
  #smartDock .smart-dock-inner {
    grid-template-columns: minmax(108px, 37%) minmax(0, 1fr) !important;
    column-gap: 6px !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle {
    height: 40px !important;
    padding-inline: 7px !important;
    gap: 4px !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle span {
    width: 20px !important;
    height: 20px !important;
    flex-basis: 20px !important;
    font-size: .76rem !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle b { font-size: .63rem !important; }
}

/* Soft-light v16 — final contrast pass for generated feature pages.
   Several legacy renderers write white text with high-specificity selectors.
   Reset every textual descendant to iOS label black first, then restore white
   only on semantic coloured controls and number chips below. */
html.lotto-soft-light body :where(
  #retro_playsets_panel,#p35copy_retro_playsets_panel
) :where(h1,h2,h3,h4,h5,h6,p,span,b,strong,small,em,label,legend,li,td,th,pre,code,summary) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}

/* Number Lab: no dark input/picker panels remain in light mode. */
html.lotto-soft-light body #mainPage45 :where(.nl-lotto,.nl-manual,.nl-manual label,.nl-pane,.nl-best,.nl-basket-box) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage45 .nl-manual input {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #d6dbd8 !important;
}
html.lotto-soft-light body #mainPage45 .nl-tabs button:not(.active),
html.lotto-soft-light body #mainPage45 .nl-tabs button:not(.active) * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background-color: transparent !important;
}
html.lotto-soft-light body #mainPage45 :where(
  .nl-tabs button.active,.nl-lotto button,.nl-manual button:not(.ghost),
  .nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit
),
html.lotto-soft-light body #mainPage45 :where(
  .nl-tabs button.active,.nl-lotto button,.nl-manual button:not(.ghost),
  .nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Local assistant: light inactive tabs use dark labels;.lai-tabs,.lai-quick,.lai-chat-input,.lai-message.assistant) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #d1d1d6 !important;
}.lai-lotto button,.lai-chat-input button,.lai-message.user,
  .lai-hot>span,.lai-chip,.lai-set-grid b,.lai-rank>b
),.lai-lotto button,.lai-chat-input button,.lai-message.user,
  .lai-hot>span,.lai-chip,.lai-set-grid b,.lai-rank>b
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Today statistics: every card/header is white or grouped grey, never emerald. */
  .p44-wrap,.p44-overview,.p44-metrics,.p44-metric,.p44-breakdown,.p44-break,
  .p44-toolbar,.p44-grid,.p44-card,.p44-empty,.p44-progress
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #d1d1d6 !important;
}
  .p44-result span,.p44-filter.active,.p44-refresh,.p44-status,.p44-badge.on
),
  .p44-result span,.p44-filter.active,.p44-refresh,.p44-status,.p44-badge.on
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Formula hub: all large containers become iOS cards with black headings. */
html.lotto-soft-light body #mainPage30 :where(
  .p30-role-stat,.p30-active-summary,.p30-role-section,.p30-role-grid,.p30-slim-group,
  .p30-slim-body,.p30-all-first-two,.p30-all-first-two-list,.p30-detail-list,
  .p30-detail-row,details.p30-details
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage30 :where(
  .p30-role-head,.p30-slim-head,.p30-all-first-two-head,details.p30-details summary
) {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage30 :where(
  .p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,
  .p30-detail-pair,.p30-top2-hot5-digit,.p30-formula-first-pair
),
html.lotto-soft-light body #mainPage30 :where(
  .p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,
  .p30-detail-pair,.p30-top2-hot5-digit,.p30-formula-first-pair
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Summary room and retrospective sets: remove the remaining dark-green slabs. */
html.lotto-soft-light body #mainPage35 :where(
  #p35Wrap,.p35Hero2,.p35Grid2,.p35LeftStack,.p35RightStack,.p35Card2,
  .p35SummaryCard,.p35Top2Box,.p35OverviewComboCard,.p35OverviewDigitCard,
  .p35OverviewPairCard,.p35CoreArchiveCard,.p35PairFocusCard,.p35LinkDrillCard,
  .p35Section2,.p35DenSection,.p35RetroBody
),
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) :where(
  .playset-head,.playset-card,.playset-body,.playset-grid
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2),
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2) *,
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) .playset-chip,
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) .playset-chip * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Number Lab */
html.lotto-soft-light #mainPage45 :where(
  .nl-hero,.nl-stats,.nl-manual,.nl-tabs,.nl-pane,.nl-source,.nl-generated,
  .nl-control-card,.nl-set,.nl-compare-table,.nl-basket-box,.nl-best,.nl-empty
) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: 0 2px 8px rgba(30, 42, 36,.06) !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-source-head,.nl-section-head,.nl-table-head,.nl-generated-head,.nl-set-head,.nl-control-title) {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-source-head,.nl-section-head,.nl-table-head,.nl-generated-head,.nl-set-head,.nl-control-title) * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #009c41 !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.lotto-soft-light #mainPage45 :where(.nl-weight,.nl-source-state,.nl-source-title small,.nl-section-head p,.nl-control-card p,.nl-set-head small,.nl-empty p) {
  color: #3a3a3c !important;
  -webkit-text-fill-color: #3a3a3c !important;
}
html.lotto-soft-light #mainPage45 .nl-tabs button:not(.active) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #d6dbd8 !important;
}

/* Today's lottery statistics */

/* Formula hub */
html.lotto-soft-light #mainPage30 :where(.p30-role-stat,.p30-active-summary,.p30-role-section,.p30-slim-group,.p30-all-first-two,.p30-formula-first-pair,details.p30-details) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: 0 2px 8px rgba(30, 42, 36,.06) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.lotto-soft-light #mainPage30 :where(.p30-role-head,.p30-slim-head,.p30-all-first-two-head,details.p30-details summary) {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light #mainPage30 :where(.p30-stat-kicker,.p30-card-kicker,.p30-stat-title,.p30-stat-meta,.p30-active-title,.p30-summary-label,.p30-role-title,.p30-role-note,.p30-role-badge,.p30-slim-title,.p30-slim-count,.p30-mini-label,.p30-detail-name,.p30-all-first-two-title,.p30-all-first-two-meta) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light #mainPage30 :where(.p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,.p30-detail-pair,.p30-top2-hot5-digit) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #009c41 !important;
  box-shadow: none !important;
}

/* Summary room, including the right-hand cards that retained emerald. */
html.lotto-soft-light #mainPage35 :where(
  #p35Wrap,.p35Grid2,.p35RightStack,.p35Card2,.p35SummaryCard,.p35Top2Box,
  .p35Top2Hot,.p35OverviewComboCard,.p35OverviewDigitCard,.p35OverviewPairCard,
  .p35CoreArchiveCard,.p35PairFocusCard,.p35LinkDrillCard,.p35Section2,.p35DenSection
) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: none !important;
}
html.lotto-soft-light #mainPage35 :where(.p35Hero2 h1,.p35Hero2 p,.p35Title2,.p35Sub2,.p35Label2,.p35TinyNote,.p35Top2Meta,.p35SummaryHead,.p35SummaryHead *) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #009c41 !important;
  box-shadow: none !important;
}
html.lotto-soft-light #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Retro play sets */
html.lotto-soft-light #retro_playsets_panel,
html.lotto-soft-light #mainPage35 .p35RetroBody #p35copy_retro_playsets_panel {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light #retro_playsets_panel :where(.playset-head,.playset-card),
html.lotto-soft-light #mainPage35 .p35RetroBody #p35copy_retro_playsets_panel :where(.playset-head,.playset-card) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light #retro_playsets_panel :where(.playset-title,.playset-sub,.playset-note,.playset-card h4),
html.lotto-soft-light #mainPage35 .p35RetroBody #p35copy_retro_playsets_panel :where(.playset-title,.playset-sub,.playset-note,.playset-card h4) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light #retro_playsets_panel .playset-chip,
html.lotto-soft-light #mainPage35 .p35RetroBody #p35copy_retro_playsets_panel .playset-chip {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #009c41 !important;
}

/* Main generated summary: white grouped cards, dark labels and calm system
   blue number chips. Orange is retained only for the live status badge. */
html.lotto-soft-light #page-main #dashP4SummarySlot,
html.lotto-soft-light #mainPage35 .p35SummaryCard {
  color: var(--soft-text) !important;
  background: var(--soft-surface) !important;
  background-image: none !important;
  border-color: var(--soft-line) !important;
  box-shadow: var(--soft-shadow) !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot :where(#p4DateDisplay,#p4LottoName),
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35InlineMeta span {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4LottoName *,
html.lotto-soft-light #page-main #dashP4SummarySlot #p4DateDisplay * {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
  text-shadow: none !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid > div:not(#p4ShareBtnWrap),
html.lotto-soft-light #mainPage35 .p35SummaryCard > .p35Section2,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35DenSection {
  color: var(--soft-text) !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: var(--soft-line) !important;
  box-shadow: none !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid > div:not(#p4ShareBtnWrap) > span,
html.lotto-soft-light #mainPage35 .p35SummaryCard :where(.p35Label2,.p35Title2) {
  color: var(--soft-text) !important;
  -webkit-text-fill-color: var(--soft-text) !important;
  text-shadow: none !important;
}
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid [style*="background:#047857"],
html.lotto-soft-light #page-main #dashP4SummarySlot #p4SourceGrid [style*="background: #047857"],
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Digit2.summary-hot,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Digit2.summary-win,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Pair2.drill-green,
html.lotto-soft-light #mainPage35 .p35SummaryCard .p35Triple2 {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #009c41 !important;
  border-color: #009c41 !important;
  box-shadow: 0 3px 8px rgba(52, 103, 137, .16) !important;
}.lai-stats,.lai-tabs,.lai-card,.lai-chat,.lai-empty,.lai-lotto,.lai-source,.lai-rank,.lai-chat-log,.lai-explain) {
  color: var(--lai-text) !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: var(--lai-line) !important;
  box-shadow: var(--soft-shadow-small) !important;
}.lai-message.assistant) {
  color: var(--lai-text) !important;
  background: #f2f2f7 !important;
  border-color: var(--lai-line) !important;
}.lai-chat-head,.lai-hero,.lai-stats,.lai-lotto,.lai-source,.lai-explain) :where(h1,h2,p,b,strong,small,span){
  color: var(--lai-text) !important;
  -webkit-text-fill-color: var(--lai-text) !important;
  text-shadow: none !important;
}.lai-card-head span,.lai-chat-head p,.lai-rank>small,.lai-empty,.lai-chat-empty) {
  color: var(--lai-muted) !important;
  -webkit-text-fill-color: var(--lai-muted) !important;
}.lai-quick button) {
  color: #34495e !important;
  -webkit-text-fill-color: #34495e !important;
  background: #f2f2f7 !important;
  border-color: var(--lai-line) !important;
}.lai-chip,.lai-set-grid b,.lai-rank>b) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #107a64 !important;
  border-color: #107a64 !important;
  box-shadow: 0 2px 7px rgba(52, 103, 137, .15) !important;
}.lai-chip,.lai-set-grid b,.lai-rank>b) * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

@media (max-width: 900px) {
  html.lotto-soft-light body,
  html.lotto-soft-light #mainPage45{ background: #eef0ef !important; }
}

/* Soft-light v11 — universal contrast and surface reset.
   Legacy pages contain many inline dark-theme colors.  A light theme must not
   inherit white labels or emerald panels from those page-specific rules. */
html.lotto-soft-light :where(.main-page-wrap,.tab-page) {
  color: #123a32 !important;
  background-color: transparent !important;
  background-image: none !important;
  text-shadow: none !important;
}
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(
  h1,h2,h3,h4,h5,h6,p,label,legend,small,strong,em,span,li,td,th,pre,code
) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(
  section,article,.card,.panel,.box,.section,
  [class$="-card"],[class$="-panel"],[class$="-section"],
  [class*="-card "],[class*="-panel "],[class*="-section "]
) {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(
  header,[class$="-head"],[class$="-header"],[class$="-titlebar"],
  [class*="-head "],[class*="-header "]
) {
  color: #123a32 !important;
  background-color: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(
  header,[class$="-head"],[class$="-header"],[class$="-titlebar"],
  [class*="-head "],[class*="-header "]
) * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}

/* Inputs and unselected controls use iOS form colors. */
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(input,textarea,select) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  caret-color: #009c41 !important;
  background: #ffffff !important;
  border-color: #d6dbd8 !important;
}
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(input,textarea)::placeholder {
  color: #88938f !important;
  -webkit-text-fill-color: #88938f !important;
  opacity: 1 !important;
}

/* Selected controls remain easy to recognise. */
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(
  button.active,button.is-active,button[aria-selected="true"],
  .tab.active,.tab-btn.active,.filter-btn.active,.mode-btn.active
) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #009c41 !important;
  background-image: none !important;
  border-color: #009c41 !important;
}
html.lotto-soft-light :where(.main-page-wrap,.tab-page) :where(
  button.active,button.is-active,button[aria-selected="true"],
  .tab.active,.tab-btn.active,.filter-btn.active,.mode-btn.active
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* The automatic contrast pass adds these classes only to elements containing
   visible text. It also covers cards generated after page load. */
html.lotto-soft-light .lotto-theme-auto-dark {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light .lotto-theme-auto-light {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* Preserve the red selected outline and dark label in the lottery picker. */
html.lotto-soft-light .lgs-option.selected,
html.lotto-soft-light .lgs-option[aria-selected="true"],
html.lotto-soft-light .lgs-option.active,
html.lotto-soft-light .lgs-option.is-active {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #e04b4b !important;
}
html.lotto-soft-light .lgs-option.selected *,
html.lotto-soft-light .lgs-option[aria-selected="true"] *,
html.lotto-soft-light .lgs-option.active *,
html.lotto-soft-light .lgs-option.is-active * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
}

/* Soft-light v17 - this block intentionally stays last. */
html.lotto-soft-light body :where(
  #retro_playsets_panel,#p35copy_retro_playsets_panel
) :where(h1,h2,h3,h4,h5,h6,p,span,b,strong,small,em,label,legend,li,td,th,pre,code,summary) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage45 :where(.nl-lotto,.nl-manual,.nl-manual label,.nl-pane,.nl-best,.nl-basket-box),.lai-tabs,.lai-quick,.lai-chat-input,.lai-message.assistant),
html.lotto-soft-light body #mainPage30 :where(.p30-role-stat,.p30-active-summary,.p30-role-section,.p30-role-grid,.p30-slim-group,.p30-slim-body,.p30-all-first-two,.p30-all-first-two-list,.p30-detail-list,.p30-detail-row,details.p30-details),
html.lotto-soft-light body #mainPage35 :where(#p35Wrap,.p35Hero2,.p35Grid2,.p35LeftStack,.p35RightStack,.p35Card2,.p35SummaryCard,.p35Top2Box,.p35OverviewComboCard,.p35OverviewDigitCard,.p35OverviewPairCard,.p35CoreArchiveCard,.p35PairFocusCard,.p35LinkDrillCard,.p35Section2,.p35DenSection,.p35RetroBody),
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel),
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) :where(.playset-head,.playset-card,.playset-body,.playset-grid) {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #d1d1d6 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage45 .nl-manual input,textarea,input) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  border-color: #c7c7cc !important;
}
html.lotto-soft-light body #mainPage45 .nl-tabs button:not(.active),
html.lotto-soft-light body #mainPage45 .nl-tabs button:not(.active) *{
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
}
html.lotto-soft-light body #mainPage30 :where(.p30-role-head,.p30-slim-head,.p30-all-first-two-head,details.p30-details summary) {
  color: #123a32 !important;
  background-color: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage45 :where(.nl-tabs button.active,.nl-lotto button,.nl-manual button:not(.ghost),.nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit),
html.lotto-soft-light body #mainPage45 :where(.nl-tabs button.active,.nl-lotto button,.nl-manual button:not(.ghost),.nl-source-digits span,.nl-set-digits b,.nl-chip b,.nl-number-cloud span,.nl-digit) *,.lai-lotto button,.lai-chat-input button,.lai-message.user,.lai-hot>span,.lai-chip,.lai-set-grid b,.lai-rank>b),.lai-lotto button,.lai-chat-input button,.lai-message.user,.lai-hot>span,.lai-chip,.lai-set-grid b,.lai-rank>b) *,
html.lotto-soft-light body #mainPage30 :where(.p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,.p30-detail-pair,.p30-top2-hot5-digit,.p30-formula-first-pair),
html.lotto-soft-light body #mainPage30 :where(.p30-big-digit,.p30-big-pair,.p30-mini-digit,.p30-mini-pair,.p30-detail-pair,.p30-top2-hot5-digit,.p30-formula-first-pair) *,
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2),
html.lotto-soft-light body #mainPage35 :where(.p35Digit2,.p35Pair2,.p35Triple2) *,
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) .playset-chip,
html.lotto-soft-light body :where(#retro_playsets_panel,#p35copy_retro_playsets_panel) .playset-chip * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Soft-light v18 - primary controls use iOS blue instead of legacy emerald. */
html.lotto-soft-light body #mainPage45 :where(.nl-lotto button,.nl-manual button:not(.ghost),.nl-tabs button.active),.lai-chat-input button,.lai-tabs button.active) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #0e8168 !important;
  background-image: none !important;
  border-color: #0e8168 !important;
}

/* Soft-light v23 — final-order corrections after legacy page styles. */
@media (max-width: 900px) {
  #smartDock .smart-dock-inner .smart-actions .lotto-theme-toggle {
    top: 3px !important;
    height: 28px !important;
    min-height: 28px !important;
  }
  #smartDock .smart-actions .smart-btn.primary {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  #smartDock .smart-actions .smart-btn.ghost {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  #smartDock .smart-actions :where(.smart-btn.nl-launcher,.smart-btn.lai-launcher) {
    display: none !important;
  }
}

@media (max-width: 900px) {
  #smartDock .smart-dock-inner {
    position: relative !important;
    grid-template-columns: minmax(116px,38%) minmax(0,1fr) !important;
    column-gap: 7px !important;
  }
  #smartDock .smart-lotto-btn { padding-right: 90px !important; }
  #smartDock .smart-actions {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 7px !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle {
    position: absolute !important;
    top: 5px !important;
    right: 8px !important;
    z-index: 3 !important;
    width: 76px !important;
    min-width: 76px !important;
    height: 32px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    border-radius: 11px !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle span {
    width: 19px !important;
    height: 19px !important;
    flex: 0 0 19px !important;
    font-size: .72rem !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle b {
    display: inline !important;
    font-size: .62rem !important;
  }
}
@media (max-width: 420px) {
  #smartDock .smart-dock-inner {
    grid-template-columns: minmax(106px,36%) minmax(0,1fr) !important;
  }
  #smartDock .smart-lotto-btn { padding-right: 82px !important; }
  #smartDock .smart-actions .lotto-theme-toggle {
    right: 7px !important;
    width: 70px !important;
    min-width: 70px !important;
    padding-inline: 6px !important;
  }
}

/* Soft-light v28 — restore semantic status colours on the main summary and
   keep the 2-digit drill set blue (never legacy emerald). */
html.lotto-soft-light body #page-main #dashP4SummarySlot .codex-date-chip-main.is-next {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg,#a91f2d,#dc3545) !important;
  border-color: #e36a74 !important;
  box-shadow: 0 7px 18px rgba(185,40,53,.20) !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot .codex-date-chip-main.is-next * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot .codex-date-chip-main.is-today {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg,#b66a0d,#e58b12) !important;
  border-color: #efb24c !important;
}
html.lotto-soft-light body #page-main #dashP4SummarySlot .codex-date-chip-main.is-today * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Generated order is: featured digits, drill, win. Target only the drill
   card so the other summary colours retain their own meaning. */
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid > div:nth-child(2)
  [style*="background:#047857"],
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid > div:nth-child(2)
  [style*="background: #047857"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
  box-shadow: 0 4px 12px rgba(0, 156, 65,.18) !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35DrillSection .p35Pair2.drill-green {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
  box-shadow: 0 4px 12px rgba(0, 156, 65,.18) !important;
}

/* Soft-light v29 — final containment and card parity fixes. */
html.lotto-soft-light body #mainPage35 .p35PairFocusCard,
html.lotto-soft-light body #mainPage35 .p35PairFocusCard > .p35Section2 {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard :where(.p35DigitRow2,.p35Top2Grid) {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  align-items: stretch !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35DigitRow2 {
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
  gap: 8px !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid {
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 8px !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard :where(.p35Digit2,.p35Pair2.ready-pair) {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  justify-self: stretch !important;
  overflow: hidden !important;
}

/* Give the retrospective Top 5 on the left the same framed treatment as the
   formula Top 5 on the right. Inline legacy gradients are reset here. */
html.lotto-soft-light body #mainPage35 .p35RetroBody #p35copy_retro_top5.num-flex {
  display: grid !important;
  grid-template-columns: repeat(5,minmax(0,72px)) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 392px !important;
  gap: 8px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
  justify-content: center !important;
}
html.lotto-soft-light body #mainPage35 .p35RetroBody #p35copy_retro_top5 .retro-big-num {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 88px !important;
  box-sizing: border-box !important;
  border-radius: 14px !important;
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #d6dbd8 !important;
  box-shadow: 0 4px 12px rgba(30, 42, 36,.06) !important;
  text-shadow: none !important;
  overflow: hidden !important;
}
html.lotto-soft-light body #mainPage35 .p35RetroBody #p35copy_retro_top5 .retro-big-num .sub {
  color: #3a3a3c !important;
  -webkit-text-fill-color: #3a3a3c !important;
  text-shadow: none !important;
}

/* Guard dynamic content against high-specificity legacy green styles. */
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta,
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta * {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage43 .p43-card .p43-row {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
}
html.lotto-soft-light body #mainPage43 .p43-card .p43-row:nth-child(even) {
  background-color: #f7f8f7 !important;
}
html.lotto-soft-light body #mainPage30 #codexFormulaHubGuide.codex-hub-guide {
  color: #123a32 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}

@media (max-width: 640px) {
  html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35DigitRow2,
  html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid {
    gap: 6px !important;
  }
  html.lotto-soft-light body #mainPage35 .p35RetroBody #p35copy_retro_top5.num-flex {
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    max-width: 100% !important;
    gap: 6px !important;
  }
  html.lotto-soft-light body #mainPage35 .p35PairFocusCard :where(.p35Digit2,.p35Pair2.ready-pair) {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  html.lotto-soft-light body #mainPage35 .p35RetroBody #p35copy_retro_top5 .retro-big-num {
    height: 74px !important;
    font-size: 2rem !important;
  }
}

/* Soft-light v31 — completed-history gate and progress feedback. */
html.lotto-soft-light body #mainPage35 .p35AccLoading .p35AccBackfill {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccLoading .p35AccBackfill.error {
  color: #8f1f29 !important;
  -webkit-text-fill-color: #8f1f29 !important;
  background: #fff0f1 !important;
  border-color: #e3a6ab !important;
}
html.lotto-soft-light body #mainPage35 .p35AccLoadingBar {
  background: #dfe3e0 !important;
  box-shadow: inset 0 1px 2px rgba(30, 42, 36,.10) !important;
}
html.lotto-soft-light body #mainPage35 .p35AccLoadingBar i {
  background: linear-gradient(90deg,#009c41,#12ad52) !important;
}

/* Soft-light v30 — audited dynamic components.
   These selectors intentionally sit last because these cards are generated
   after page load and still carry legacy inline green styles. */

/* One calm iOS-style summary header instead of blue around white labels. */
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35SummaryHead {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: auto !important;
  max-width: min(100%,440px) !important;
  min-height: 52px !important;
  padding: 9px 15px !important;
  box-sizing: border-box !important;
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border: 1px solid #dfe3e0 !important;
  border-radius: 16px !important;
  box-shadow: 0 5px 14px rgba(0, 156, 65,.10) !important;
  overflow: hidden !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta :where(span,.lotto) {
  min-width: 0 !important;
  padding: 0 !important;
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  white-space: nowrap !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta .lotto {
  font-weight: 900 !important;
}
html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta span + span::before {
  content: "•" !important;
  display: inline-block !important;
  margin: 0 9px !important;
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
}

/* Legacy pair chips are content-box, so their padding made them wider than
   their tracks. Force border-box and keep a visible gutter on every side. */
html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid {
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  column-gap: 12px !important;
  row-gap: 10px !important;
  padding: 2px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid > .p35Pair2.ready-pair {
  display: flex !important;
  inline-size: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 0 4px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  justify-self: stretch !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 7px rgba(0, 156, 65,.12) !important;
  overflow: hidden !important;
}

/* Remove dark-green alternating rows. Semantic hit/miss colours remain only
   inside the individual badges. */
html.lotto-soft-light body #mainPage35 .p35AccRow,
html.lotto-soft-light body #mainPage35 .p35AccRow:nth-child(odd),
html.lotto-soft-light body #mainPage35 .p35AccRow:nth-child(even) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccRow:nth-child(even) {
  background: #f7f8f7 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccBadges {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccBadge:not(.hit) {
  color: #2c2c2e !important;
  -webkit-text-fill-color: #2c2c2e !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccBadge.hit {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(180deg,#e5484d,#bd2530) !important;
  border-color: #ed7378 !important;
  text-shadow: none !important;
}

/* Some formula layouts use p43-row without the older p43-card ancestor. */
html.lotto-soft-light body #mainPage43 .p43-row,
html.lotto-soft-light body #mainPage43 .p43-row:nth-child(odd),
html.lotto-soft-light body #mainPage43 .p43-row:nth-child(even) {
  color: #123a32 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e3e6e4 !important;
  box-shadow: none !important;
}
html.lotto-soft-light body #mainPage43 .p43-row:nth-child(even) {
  background: #f7f8f7 !important;
}
html.lotto-soft-light body #mainPage43 .p43-row :where(.p43-date,.p43-draw,.p43-pred,.p43-predline) {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage43 .p43-row .p43-mini.out {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
}
html.lotto-soft-light body #mainPage43 .p43-row .p43-mini.in {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #c92f3b !important;
  background-image: none !important;
}

/* Main analysis drill boxes are generated with an inline rgb green. Match
   both source forms and repaint only the second (drill) card. */
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid > div:nth-child(2) [style*="background:#047857"],
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid > div:nth-child(2) [style*="background: #047857"],
html.lotto-soft-light body #page-main #dashP4SummarySlot #p4SourceGrid > div:nth-child(2) [style*="background: rgb(4, 120, 87)"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
  box-shadow: 0 4px 12px rgba(0, 156, 65,.16) !important;
}

/* Soft-light v35 — compact mobile dock and readable lottery picker.
   This block deliberately stays last: older responsive passes positioned the
   theme switch absolutely while also making it 100% wide, which pushed it
   beyond the phone viewport. */
@media (max-width: 900px) {
  #smartDock .smart-dock-inner {
    grid-template-columns: minmax(96px,34%) minmax(0,66%) !important;
    gap: 7px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow: hidden !important;
  }
  #smartDock .smart-lotto-btn {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding-right: 88px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #smartDock #smartDockInput.smart-input {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-inline: 7px !important;
    font-size: .78rem !important;
    letter-spacing: .25px !important;
  }
  #smartDock .smart-actions {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(64px,.72fr) minmax(104px,1.28fr) !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  #smartDock .smart-actions .smart-btn.primary,
  #smartDock .smart-actions .smart-btn.ghost {
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
    font-size: .62rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  #smartDock .smart-actions .smart-btn.primary { grid-column: 1 !important; }
  #smartDock .smart-actions .smart-btn.ghost { grid-column: 2 !important; }
  #smartDock .smart-actions .lotto-theme-toggle {
    position: absolute !important;
    top: 11px !important;
    right: 18px !important;
    z-index: 4 !important;
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 6px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    overflow: hidden !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle span {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    font-size: .68rem !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle b {
    display: inline !important;
    min-width: 0 !important;
    font-size: .59rem !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  #smartDock .smart-dock-inner {
    grid-template-columns: minmax(88px,32%) minmax(0,68%) !important;
    gap: 5px !important;
    padding-inline: 8px !important;
  }
  #smartDock .smart-lotto-btn { padding-right: 80px !important; }
  #smartDock .smart-actions {
    grid-template-columns: minmax(58px,.66fr) minmax(98px,1.34fr) !important;
    gap: 5px !important;
  }
  #smartDock .smart-actions .smart-btn.primary,
  #smartDock .smart-actions .smart-btn.ghost {
    padding-inline: 3px !important;
    font-size: .57rem !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle {
    right: 14px !important;
    width: 66px !important;
    min-width: 66px !important;
    max-width: 66px !important;
  }
}

/* The update action must remain legible on the white theme. */
html.lotto-soft-light #smartDock .smart-actions .smart-btn.ghost {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
  box-shadow: 0 3px 9px rgba(0, 156, 65,.16) !important;
}
html.lotto-soft-light #smartDock .smart-actions .smart-btn.ghost * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Replace the cramped legacy lottery menu with touch-friendly grouped cards. */
.lotto-modal-panel {
  width: min(680px,100%) !important;
  max-height: min(82dvh,720px) !important;
}
.lotto-modal-panel #lottoDropList {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  max-height: calc(min(82dvh,720px) - 58px) !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
.lotto-modal-panel #lottoDropList .lotto-opt-group {
  grid-column: 1 / -1 !important;
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  margin: 5px 0 0 !important;
  padding: 7px 10px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(94,205,177,.22) !important;
  border-radius: 10px !important;
  color: #d9fff4 !important;
  -webkit-text-fill-color: #d9fff4 !important;
  background: rgba(10,95,77,.48) !important;
  font-size: .7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}
.lotto-modal-panel #lottoDropList .lotto-opt {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 43px !important;
  margin: 0 !important;
  padding: 8px 34px 8px 11px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(115,208,185,.28) !important;
  border-radius: 11px !important;
  color: #f5fffb !important;
  -webkit-text-fill-color: #f5fffb !important;
  background: #075345 !important;
  background-image: linear-gradient(145deg,#0a604f,#06483d) !important;
  box-shadow: none !important;
  font-size: .76rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: left !important;
}
.lotto-modal-panel #lottoDropList .lotto-opt:hover {
  background: #0b6a57 !important;
  background-image: none !important;
  border-color: #55bea5 !important;
}
.lotto-modal-panel #lottoDropList .lotto-opt.selected {
  border: 2px solid #ef4444 !important;
  padding: 7px 33px 7px 10px !important;
  background: #0a5a4b !important;
  background-image: none !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,.13) !important;
}
.lotto-modal-panel #lottoDropList .lotto-opt.selected::after {
  content: "✓" !important;
  position: absolute !important;
  right: 9px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 20px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #ef4444 !important;
  font-size: .68rem !important;
  font-weight: 1000 !important;
}

html.lotto-soft-light .lotto-modal-panel #lottoDropList {
  background: #ffffff !important;
}
html.lotto-soft-light .lotto-modal-panel #lottoDropList .lotto-opt-group {
  color: #009c41 !important;
  -webkit-text-fill-color: #009c41 !important;
  background: #f1f3f2 !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light .lotto-modal-panel #lottoDropList .lotto-opt {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #f7f8f7 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light .lotto-modal-panel #lottoDropList .lotto-opt:hover {
  background: #f1f3f2 !important;
  border-color: #c3cac6 !important;
}
html.lotto-soft-light .lotto-modal-panel #lottoDropList .lotto-opt.selected {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  background: #fff7f7 !important;
  border-color: #ef4444 !important;
}

@media (max-width: 560px) {
  .lotto-modal-backdrop { padding: 10px !important; }
  .lotto-modal-panel { border-radius: 16px !important; }
  .lotto-modal-panel #lottoDropList {
    gap: 7px !important;
    padding: 9px !important;
  }
  .lotto-modal-panel #lottoDropList .lotto-opt {
    min-height: 42px !important;
    padding-left: 9px !important;
    font-size: .69rem !important;
  }
}

/* Keep the longer update label inside the desktop dock as well. */
#smartDock,
#smartDock .smart-dock-inner {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#smartDock .smart-actions .smart-btn.ghost {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #123f38 !important;
  background-image: none !important;
  border-color: #2d6b60 !important;
}
@media (min-width: 901px) {
  #smartDock .smart-dock-inner {
    width: min(980px,100%) !important;
    grid-template-columns: auto minmax(150px,.8fr) minmax(160px,.76fr) minmax(280px,1.18fr) !important;
    gap: 8px !important;
  }
  #smartDock .smart-actions {
    display: grid !important;
    grid-template-columns: 68px minmax(82px,.72fr) minmax(128px,1.28fr) !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle,
  #smartDock .smart-actions .smart-btn.primary,
  #smartDock .smart-actions .smart-btn.ghost {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-inline: 7px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  #smartDock .smart-actions .lotto-theme-toggle { grid-column: 1 !important; }
  #smartDock .smart-actions .smart-btn.primary { grid-column: 2 !important; }
  #smartDock .smart-actions .smart-btn.ghost {
    grid-column: 3 !important;
    font-size: .64rem !important;
  }
}
html.lotto-soft-light #smartDock .smart-actions .smart-btn.ghost {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #009c41 !important;
  background-image: none !important;
  border-color: #074e25 !important;
}

@media (max-width: 640px) {
  html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta {
    max-width: 100% !important;
    min-height: 48px !important;
    padding: 8px 11px !important;
  }
  html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta :where(span,.lotto) {
    font-size: .94rem !important;
  }
  html.lotto-soft-light body #mainPage35 .p35SummaryCard .p35InlineMeta span + span::before {
    margin: 0 6px !important;
  }
  html.lotto-soft-light body #mainPage35 .p35PairFocusCard .p35Top2Grid {
    column-gap: 8px !important;
    row-gap: 8px !important;
  }
}

/* Soft-light v32 final cascade guard — keep semantic colours readable after
   all legacy page-specific rules above have been evaluated. */
html.lotto-soft-light body .codex-date-chip-main.is-next {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg,#a91f2d,#dc3545) !important;
  background-image: linear-gradient(135deg,#a91f2d,#dc3545) !important;
  border-color: #e36a74 !important;
  box-shadow: 0 7px 18px rgba(185,40,53,.20) !important;
}
html.lotto-soft-light body .codex-date-chip-main.is-next * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.lotto-soft-light body #mainPage35 .p35AccHead {
  color: #123a32 !important;
  background: #f1f3f2 !important;
  background-image: none !important;
  border-color: #dfe3e0 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccTitle {
  color: #123a32 !important;
  -webkit-text-fill-color: #123a32 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccSub {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent {
  color: #22302b !important;
  background: conic-gradient(#c92f3b calc(var(--p)*1%),#dfe3e0 0) !important;
  box-shadow: 0 0 0 1px #dfe3e0,0 6px 14px rgba(45,60,75,.12) !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent::before {
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px #f1f3f2 !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent :where(span,small,b) {
  color: #22302b !important;
  -webkit-text-fill-color: #22302b !important;
  text-shadow: none !important;
}
html.lotto-soft-light body #mainPage35 .p35AccPercent small {
  color: #5b6a64 !important;
  -webkit-text-fill-color: #5b6a64 !important;
}

/* ── Floating theme switch ─────────────────────────────────────────────
   Pages without a toolbar (index, login, settings, policy pages) still need
   the switch, so it parks itself in the corner instead of being left out. */
.lotto-theme-toggle-floating{
  position:fixed; right:14px; bottom:14px; z-index:2147483000;
  display:inline-flex; align-items:center; gap:6px;
  min-height:40px; padding:9px 14px;
  border:1px solid rgba(255,255,255,.22); border-radius:999px;
  color:#eafff8; background:linear-gradient(145deg,#12907a,#0b7361);
  box-shadow:0 6px 18px rgba(0,26,21,.28);
  font:inherit; font-size:.78rem; font-weight:800; line-height:1;
  cursor:pointer; touch-action:manipulation;
}
/* อยู่ในแถบชื่อแล้ว แต่เจ้าของอยากได้หน้าตากลม ๆ แบบตอนลอยอยู่มุมจอ */
#appTopbarActions .lotto-theme-toggle{
  width:38px !important; height:38px !important; min-width:38px !important;
  padding:0 !important; border-radius:50% !important;
  display:inline-flex !important; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.22) !important;
  background:linear-gradient(145deg,#12907a,#0b7361) !important;
  color:#eafff8 !important; -webkit-text-fill-color:#eafff8 !important;
  box-shadow:0 4px 12px rgba(0,26,21,.24) !important;
  cursor:pointer; flex:none;
}
#appTopbarActions .lotto-theme-toggle span{font-size:1.05rem; line-height:1}
#appTopbarActions .lotto-theme-toggle b{display:none !important}
html.lotto-soft-light #appTopbarActions .lotto-theme-toggle{
  background:linear-gradient(145deg,#ffe9a8,#f7d271) !important;
  border-color:rgba(150,110,20,.28) !important;
  color:#0b3f34 !important; -webkit-text-fill-color:#0b3f34 !important;
  box-shadow:0 4px 12px rgba(120,88,10,.18) !important;
}
@media (hover:hover){ #appTopbarActions .lotto-theme-toggle:hover{transform:translateY(-1px)} }
@media (max-width:520px){
  #appTopbarActions .lotto-theme-toggle{width:34px !important;height:34px !important;min-width:34px !important}
  #appTopbarActions .lotto-theme-toggle span{font-size:.95rem}
}
.lotto-theme-toggle-floating b{font-weight:900}
.lotto-theme-toggle-floating span{font-size:.9rem}
@media (hover:hover){ .lotto-theme-toggle-floating:hover{transform:translateY(-1px)} }
html.lotto-soft-light .lotto-theme-toggle-floating{
  color:#0b3f34 !important; -webkit-text-fill-color:#0b3f34 !important;
  background:linear-gradient(145deg,#ffe9a8,#f7d271) !important;
  border-color:rgba(150,110,20,.28) !important;
  box-shadow:0 6px 18px rgba(120,88,10,.20) !important;
}
@media (max-width:520px){
  .lotto-theme-toggle-floating{right:10px; bottom:10px; padding:8px 12px; font-size:.72rem}
}

/* ══════════════════════════════════════════════════════════════════════
   Light mode for the pages outside the app shell — the marketing home,
   the login/sign-up card and the policy pages. They were built dark-only,
   so the theme had nothing to override and they stayed green on green.
   White paper, green ink; the call-to-action buttons keep their colour.
   ══════════════════════════════════════════════════════════════════════ */
html.lotto-soft-light :is(.promo-page, .seo-page, .legal-page){
  background:#f2f7f5 !important; background-image:none !important; color:#123a32 !important;
}
html.lotto-soft-light :is(.seo-nav, .legal-nav){
  background:rgba(255,255,255,.94) !important; backdrop-filter:saturate(1.4) blur(10px);
  border-bottom:1px solid #dfe5e1 !important; box-shadow:0 1px 12px rgba(18,58,50,.06) !important;
}
/* Panels and cards become paper. */
html.lotto-soft-light :is(.promo-page, .seo-page, .legal-page) :is(
  .seo-preview, .seo-card, .seo-screen-card, .seo-screen-media, .seo-section,
  .seo-final, .seo-step, .seo-steps, .seo-proof, .seo-pairs, .seo-menu-list,
  .auth-panel, .auth-menu, .auth-card, .program-preview-menu, .program-preview-content,
  .legal-shell, .legal-hero, details, article
){
  background:#ffffff !important; background-image:none !important;
  border-color:#dfe5e1 !important; color:#123a32 !important;
  box-shadow:0 6px 20px rgba(18,58,50,.06) !important;
}
/* Text: green ink everywhere except inside a coloured control. */
html.lotto-soft-light :is(.promo-page, .seo-page, .legal-page) :is(
  h1,h2,h3,h4,h5,h6,p,li,dt,dd,summary,figcaption,blockquote,label,th,td,strong,em,small
):not(.primary-btn):not(.primary-btn *){
  color:#123a32 !important; -webkit-text-fill-color:#123a32 !important; text-shadow:none !important;
}
html.lotto-soft-light :is(.promo-page, .seo-page, .legal-page) :is(small, .seo-screen-caption, .auth-panel-heading small){
  color:#5b6a64 !important; -webkit-text-fill-color:#5b6a64 !important;
}
/* Plain links stay green and readable; buttons keep their own paint. */
html.lotto-soft-light :is(.promo-page, .seo-page, .legal-page) a:not([class*="btn"]):not(.promo-brand){
  color:#009c41 !important; -webkit-text-fill-color:#009c41 !important;
}
html.lotto-soft-light :is(.seo-nav-btn, .auth-secondary-btn){
  color:#074e25 !important; -webkit-text-fill-color:#074e25 !important;
  background:#eef6f3 !important; border-color:#dfe5e1 !important;
}
/* The green call-to-action keeps white text on green. */
html.lotto-soft-light :is(.seo-nav-signup, .primary-btn, .auth-submit-btn),
html.lotto-soft-light :is(.seo-nav-signup, .primary-btn, .auth-submit-btn) *{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important;
}
html.lotto-soft-light :is(.seo-nav-signup, .primary-btn, .auth-submit-btn){
  background:linear-gradient(145deg,#009c41,#009c41) !important; border-color:#074e25 !important;
}
/* The brand tile is a dark badge by design — keep it legible on white. */
html.lotto-soft-light :is(.promo-brand, .auth-brand-link) .brand-mark{
  background:#0b3f34 !important; border-color:#074e25 !important;
}
html.lotto-soft-light :is(.promo-brand, .auth-brand-link),
html.lotto-soft-light :is(.promo-brand, .auth-brand-link) span{
  color:#0b3f34 !important; -webkit-text-fill-color:#0b3f34 !important;
}

/* The footer sits outside .promo-page, so the block above never reached it and
   its pale text ended up invisible once the page turned white. */
html.lotto-soft-light :is(.seo-footer, .site-footer, .legal-footer){
  background:#ffffff !important; background-image:none !important;
  border-top:1px solid #dfe5e1 !important;
}
html.lotto-soft-light :is(.seo-footer, .site-footer, .legal-footer),
html.lotto-soft-light :is(.seo-footer, .site-footer, .legal-footer) :is(p,span,small,li,div),
html.lotto-soft-light .site-legal-links,
html.lotto-soft-light .site-legal-links a{
  color:#5b6a64 !important; -webkit-text-fill-color:#5b6a64 !important;
}
html.lotto-soft-light :is(.seo-footer, .site-footer, .legal-footer) a:hover,
html.lotto-soft-light .site-legal-links a:hover{
  color:#009c41 !important; -webkit-text-fill-color:#009c41 !important;
}

/* Pale-green badge text on a pale-green pill reads at 1.13:1 once the card
   turns white. Give it a proper green chip instead. */
html.lotto-soft-light :is(.auth-secure-badge, .seo-preview-label, .seo-badge, .promo-badge){
  color:#074e25 !important; -webkit-text-fill-color:#074e25 !important;
  background:#e6f4ea !important; border-color:#bfe3cb !important;
}

/* ── Room for the theme switch in page toolbars ────────────────────────
   Adding the switch made the home-page header one control too wide on a
   phone: the sign-up button was pushed off the right edge. The switch drops
   to its icon on small screens and the row may wrap instead of overflowing. */
@media (max-width: 600px){
  .seo-nav-inner{ flex-wrap:wrap; gap:8px; }
  .seo-actions{ flex-wrap:wrap !important; gap:6px !important; min-width:0; }
  .legal-nav-actions, .top-actions{ flex-wrap:wrap; gap:6px; }
  #lottoThemeToggle.lotto-theme-toggle:not(.lotto-theme-toggle-floating) b{ display:none; }
  #lottoThemeToggle.lotto-theme-toggle:not(.lotto-theme-toggle-floating){
    min-width:40px; padding-left:10px; padding-right:10px;
  }
}
/* Beside the logo on the sign-in card the switch is an icon button, so the
   brand and the security badge keep their places. */
.auth-card-brand{ gap:8px; }
.auth-card-brand #lottoThemeToggle.lotto-theme-toggle{
  flex:0 0 auto; min-width:38px; min-height:38px; padding:0 10px; border-radius:12px;
}
.auth-card-brand #lottoThemeToggle.lotto-theme-toggle b{ display:none; }

/* ══ แบบ B ทั้งเว็บ (เจ้าของเลือก 2026-09-11) ══════════════════════════════
   พื้นเทากลาง #eef0ef · การ์ดขาว · ของสำคัญ/ที่เลือกอยู่ = เขียวทึบ #009c41
   ชุดสีด้านบนถูกแปลงจากโทนเขียวอมฟ้า/เทาอมฟ้าเดิมมาแล้ว ส่วนนี้คือของที่
   ต้องสั่งตรง ๆ ให้ชนะกฎเก่าที่ซ้อนกันหลายชั้น (โหมดขาวเท่านั้น) */
html.lotto-soft-light[data-lotto-theme] body,
html.lotto-soft-light[data-lotto-theme] body.light-theme{
  background:#eef0ef !important; background-image:none !important;
}
html.lotto-soft-light[data-lotto-theme] body::after{ display:none !important; }
/* หน้านอกโปรแกรม (หน้าแรก / เข้าสู่ระบบ / สมัคร / นโยบาย) ใช้พื้นเทาเดียวกัน */
html.lotto-soft-light[data-lotto-theme] :is(.promo-page, .seo-page, .legal-page){
  background:#eef0ef !important; background-image:none !important;
}
/* ปุ่มติดต่อแอดมิน: เดิมเป็นแคปซูลฟ้าลอยอยู่ในกล่องขาวอีกชั้น */
html.lotto-soft-light[data-lotto-theme] :is(#promoContactBox, .promo-contact-box, .contact-box){
  background:transparent !important; border:0 !important; box-shadow:none !important;
}
html.lotto-soft-light[data-lotto-theme] .facebook-contact-link{
  background:#ffffff !important; border:1px solid #dfe3e0 !important;
  box-shadow:0 4px 12px rgba(30,42,36,.06) !important;
}
html.lotto-soft-light[data-lotto-theme] .facebook-contact-link > span:not(.fb-app-icon),
html.lotto-soft-light[data-lotto-theme] .facebook-contact-link small{
  color:#074e25 !important; -webkit-text-fill-color:#074e25 !important;
}
/* หน้าแรก: ตัวแถบ section / หัวข้อ / แถวป้าย เป็นแค่ที่วาง ให้โปร่งลงบนพื้นเทา
   การ์ดข้างในจึงเด่นเป็นการ์ดขาวจริง ๆ (เดิมทั้งแถบขาว หัวข้อมีกล่องเทาซ้อน) */
html.lotto-soft-light[data-lotto-theme] .seo-page :is(.seo-section, .seo-section-head, .seo-steps, .seo-proof){
  background:transparent !important; background-image:none !important;
  border-color:transparent !important; box-shadow:none !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-proof > *{
  background:#ffffff !important; border:1px solid #e3e6e4 !important;
}
/* หน้านโยบาย/ข้อกำหนด: กรอบนอกโปร่ง แต่ละหัวข้อเป็นการ์ดขาวบนพื้นเทา
   กล่องคำเตือนเดิมเป็นน้ำตาลขุ่น → เหลืองอ่อนเส้นเหลือง อ่านว่า "ระวัง" ชัดกว่า */
html.lotto-soft-light[data-lotto-theme] .legal-page .legal-shell{
  background:transparent !important; border-color:transparent !important; box-shadow:none !important;
}
html.lotto-soft-light[data-lotto-theme] .legal-page :is(.legal-hero, .legal-section){
  background:#ffffff !important; border:1px solid #e3e6e4 !important;
  box-shadow:0 4px 14px rgba(30,42,36,.05) !important;
}
html.lotto-soft-light[data-lotto-theme] .legal-page .legal-section.legal-warning{
  background:#fff8e6 !important; border-color:#f0d58a !important;
}
html.lotto-soft-light[data-lotto-theme] .legal-page .legal-summary{
  background:#e6f4ea !important; border-color:#bfe3cb !important;
}
/* แถบโหลดตอนตรวจสิทธิ์สมาชิก (หน้าเข้าโปรแกรม) เดิมเขียว→ฟ้า */
html.lotto-soft-light[data-lotto-theme] .loader-bar span{
  background:linear-gradient(90deg,#009c41,#12ad52) !important;
}
/* ป้ายหัวเรื่องหน้านโยบาย เดิมเขียวมิ้นต์อ่อนบนพื้นขาว (มองแทบไม่เห็น) */
html.lotto-soft-light[data-lotto-theme] .legal-kicker{
  color:#074e25 !important; -webkit-text-fill-color:#074e25 !important;
  background:#e6f4ea !important; border-color:#bfe3cb !important;
}
/* แพ็กเกจที่เลือกอยู่ = เขียว (เดิมกรอบทอง) */
html.lotto-soft-light[data-lotto-theme] body:has(.page-shell) .plan-card.active{
  border-color:#009c41 !important; box-shadow:0 0 0 2px rgba(0,156,65,.25), 0 8px 22px rgba(0,156,65,.12) !important;
}
/* ปุ่ม "เมนู" (หัวโปรแกรมบนมือถือ), ปุ่มแถบบนของหน้าสมาชิก (ตั้งค่า / หลังบ้าน /
   เข้าโปรแกรม / ออก) และปุ่ม "วิเคราะห์เลย" = เขียวทึบเดียวกับการ์ดสรุปเด่น
   (เจ้าของขอ 2026-09-11 — เดิมเป็นเทาอมเขียว / ขาว / ไล่เขียวอมฟ้าของเก่า)
   ปุ่มสลับโหมด (พระอาทิตย์) ยังเป็นสีทองเหมือนเดิม */
html.lotto-soft-light[data-lotto-theme] #sidebarToggle,
html.lotto-soft-light[data-lotto-theme] body .topbar .top-actions a,
html.lotto-soft-light[data-lotto-theme] body .topbar .top-actions button:not(.lotto-theme-toggle),
html.lotto-soft-light[data-lotto-theme] body .codex-cta-analyze{
  background:#009c41 !important; background-image:none !important; border-color:#009c41 !important;
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important; text-shadow:none !important;
  box-shadow:0 4px 12px rgba(0,156,65,.22) !important;
}
html.lotto-soft-light[data-lotto-theme] body .topbar .top-actions a *,
html.lotto-soft-light[data-lotto-theme] body .codex-cta-analyze *{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important;
}

/* ── หน้าแรก: ปุ่มขอบในแถว CTA + กล่อง "ตัวอย่างสรุปเด่น" (แก้ 2026-09-11) ──
   เดิมพึ่งตัวทาสีอัตโนมัติ บน iPhone เลยได้ตัวหนังสือขาวบนพื้นขาว
   ตอนนี้กำหนดสีตรง ๆ และตัวทาสีถูกสั่งให้ข้ามส่วนนี้แล้ว */
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-cta .ghost-btn{
  background:#ffffff !important; background-image:none !important; border:1.5px solid #bfe3cb !important;
  color:#074e25 !important; -webkit-text-fill-color:#074e25 !important; box-shadow:none !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-cta .primary-btn,
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-cta .primary-btn *{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-preview-head{
  background:transparent !important; border:0 !important; box-shadow:none !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-preview-head b{
  color:#22302b !important; -webkit-text-fill-color:#22302b !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-preview-head span{
  color:#7a5a00 !important; -webkit-text-fill-color:#7a5a00 !important;
  background:#fff6df !important; border-color:#f0d58a !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-preview-label{
  color:#074e25 !important; -webkit-text-fill-color:#074e25 !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-digits b{
  background:#009c41 !important; background-image:none !important;
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-pairs{
  background:transparent !important; border:0 !important; box-shadow:none !important;
}
html.lotto-soft-light[data-lotto-theme] .seo-page .seo-pairs span{
  background:#009c41 !important; background-image:none !important; border-color:#009c41 !important;
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important; font-weight:700 !important;
}

/* ── ชื่อหวยในรายการเลือกหวย: เขียวเข้มกลาง (เจ้าของสั่ง 2026-09-14 "เขียวกว่านี้ แต่ไม่เขียวเท่าพื้นที่เลือกอยู่") ── */
html.lotto-soft-light body .lgs-option:not(.selected):not(.active):not(.is-active):not([aria-selected="true"]),
html.lotto-soft-light body .lgs-option:not(.selected):not(.active):not(.is-active):not([aria-selected="true"]) * {
  color: #0a7a3a !important;
  -webkit-text-fill-color: #0a7a3a !important;
  font-weight: 800 !important;
}

/* 2026-09-18: โลโก้ตะวันดีวงกลมโปร่ง ไม่มีกรอบ/พื้น/เงา (ทับกฎด้านบนทั้งหมด) */
html.lotto-soft-light img.brand-mark,html.lotto-soft-light .brand-mark img,html.lotto-soft-light .smart-brand-mark,html.lotto-soft-light :is(.promo-brand,.auth-brand-link) .brand-mark{background:transparent !important;background-color:transparent !important;border-radius:50% !important;box-shadow:none !important;border:0 !important}

/* ══ 2026-09-23 เจ้าของ: ปุ่มสลับโหมด = แคปซูลแนวนอนเหมือนกันทุกหน้า — codex-theme-pill (ทุกหน้า) ══
   โหมดขาว: ลูกกลมพระอาทิตย์ซ้าย + ป้าย "ขาว" · โหมดเขียว: ป้าย "เขียว" ซ้าย + ลูกกลมพระจันทร์ครึ่งขวา
   ป้ายมาจาก ::before เพราะสคริปต์เขียน innerHTML ของปุ่มใหม่ทุกครั้งที่สลับ (เหลือแค่ span ไอคอน)
   ใช้ #lottoThemeToggle ซ้ำสองครั้ง (2 id) เพื่อชนะกฎเดิมในไฟล์นี้เองที่เป็น id+2 คลาส เช่น
   html.lotto-soft-light #appTopbarActions .lotto-theme-toggle — ไม่งั้นแคปซูลถูกบีบกลับเป็นวงกลม */
html body #lottoThemeToggle#lottoThemeToggle{
  width:auto !important;min-width:0 !important;max-width:none !important;
  height:34px !important;min-height:34px !important;max-height:34px !important;
  flex:0 0 auto !important;display:inline-flex !important;align-items:center !important;gap:0 !important;
  padding:3px !important;padding-inline:3px !important;border-radius:999px !important;box-shadow:none !important;
  font-family:inherit !important;font-size:.68rem !important;font-weight:400 !important;line-height:1 !important;
  white-space:nowrap !important;transform:none !important;justify-content:flex-start !important;
  background:#e8eef1 !important;background-image:none !important;border:1px solid #d7e1e6 !important;
  color:#5d6f67 !important;-webkit-text-fill-color:#5d6f67 !important}
html body #lottoThemeToggle#lottoThemeToggle::before{
  content:"ขาว";order:2;padding:0 10px 0 6px;
  font-size:inherit !important;font-weight:inherit !important;color:inherit !important;-webkit-text-fill-color:inherit !important}
html body #lottoThemeToggle#lottoThemeToggle > span{
  order:1;width:28px !important;height:28px !important;min-width:28px !important;flex:0 0 28px !important;
  border-radius:50% !important;display:grid !important;place-items:center !important;
  background:#fff !important;background-image:none !important;font-size:15px !important;line-height:1 !important;
  color:#f97316 !important;-webkit-text-fill-color:#f97316 !important;box-shadow:0 1px 3px rgba(0,0,0,.20) !important}
html body #lottoThemeToggle#lottoThemeToggle b{display:none !important}
html:not(.lotto-soft-light) body #lottoThemeToggle#lottoThemeToggle{
  justify-content:flex-end !important;background:#13241f !important;background-image:none !important;
  border:1px solid rgba(255,255,255,.16) !important;color:#eafff8 !important;-webkit-text-fill-color:#eafff8 !important}
html:not(.lotto-soft-light) body #lottoThemeToggle#lottoThemeToggle::before{content:"เขียว";order:0;padding:0 6px 0 11px}
html:not(.lotto-soft-light) body #lottoThemeToggle#lottoThemeToggle > span{order:1;color:#3f51d5 !important;-webkit-text-fill-color:#3f51d5 !important}
@media (max-width:700px){
  html body #lottoThemeToggle#lottoThemeToggle{height:30px !important;min-height:30px !important;max-height:30px !important;font-size:.62rem !important}
  html body #lottoThemeToggle#lottoThemeToggle > span{width:24px !important;height:24px !important;min-width:24px !important;flex:0 0 24px !important;font-size:13px !important}
}
