/* Optimized Light 161. Loaded last; custom light backgrounds share this layer. */
html[data-theme-mode="light"] {
 --light-soft:color-mix(in srgb,var(--theme-bg) 75%,var(--theme-surface));
 --light-selected:color-mix(in srgb,var(--theme-primary) 8%,var(--theme-surface));
 --text-muted:var(--theme-muted);
 --success:#166534;--danger:#b91c1c;--warning:#8a5908;
 scrollbar-color:var(--theme-muted) var(--theme-bg);
}
html[data-theme-mode="light"] body,
html[data-theme-mode="light"] :is(.screen,.app-screen,.auth-screen,.admin-shell,.main-content,.content-area,.app-shell,.app-main,.page-shell,.player-shell,main),
html[data-theme-mode="light"] :is(#dashboardScreen,#portalScreen,#authScreen) {
 background:var(--theme-bg)!important;color:var(--theme-text)!important;
}
/* Pause handled by the theme runtime; avoid glass and decorative animation work. */
html[data-theme-mode="light"] :is(.dragon-video-background,#adminMotionBackground) {display:none!important;}
html[data-theme-mode="light"] :is(body,.screen,.sidebar,.topbar,.panel,.card,.modal-card,.auth-card,.login-card,.account-drawer,.manual-card,.keyin-card,.summary-card,.side-panel)::before,
html[data-theme-mode="light"] :is(body,.screen,.sidebar,.topbar,.panel,.card,.modal-card,.auth-card,.login-card,.account-drawer,.manual-card,.keyin-card,.summary-card,.side-panel)::after {background-image:none!important;animation:none!important;box-shadow:none!important;pointer-events:none!important;}
html[data-theme-mode="light"] *,html[data-theme-mode="light"] *::before,html[data-theme-mode="light"] *::after {
 animation:none!important;transition:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 text-shadow:none!important;box-shadow:none!important;
}
html[data-theme-mode="light"] :is(.sidebar,.topbar,.panel,.card,.auth-card,.login-card,.modal-card,.cs-modal-card,.ui-dialog-card,.form-card,.stat-card,.settings-card,.view-context-bar,.admin-mini-card,.player-mini-card,.admin-view-guide,.admin-directory-link,.admin-data-health,.theme-editor-card,.logo-upload-card,.handbook-card,.notification-panel,.notification-settings-panel,.wallet-card,.dashboard-card,.detail-card,.security-overview-card,.security-summary,.kyc-status-card,.payout-channel-panel,.payout-saved-panel,.support-popup-card,.support-popup-view,.smart-help-panel,.bot-message-card,.messenger-live-panel,.empty-card,.placeholder-card,.payment-channel-admin-card,.ops-kpi-card,.ops-health-card,.ops-cache-card,.ops-chart-card,.cs-metric-card,.cs-case-panel,.cs-history-info-panel,.cs-history-records-panel,.accounting-breakdown-card,.accounting-statement-card,.accounting-expense-entry-card,.accounting-expense-list-card,.accounting-statement,.client-gaming-net-card,.manual-card,.keyin-card,.summary-card,.side-panel,.account-drawer,.wallet-box,.total-chip,.combo-preview,.validation-box,.result-card,.txn-card,.drawer-action,.gateway-wallet-route-pill,.gateway-wallet-placeholder) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;
 border-color:var(--border)!important;
}
html[data-theme-mode="light"] :is(.sidebar-header,.sidebar-footer,.notification-panel-head,.panel-header,.modal-header,.drawer-head,.drawer-title,.txn-head,.messenger-chat-header,.support-admin-chat-header,.cs-case-panel-head,.wallet-actions-header,.wallet-action-panel-heading,.wallet-payment-toolbar,.wallet-payment-success,.player-site-footer,.player-footer-main,.player-footer-bottom,.player-footer-trust,.terminal-head,.bet-footer,.summary-title,.table-wrap,.table-container,.accounting-table-section,.accounting-table-wrap) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;
}
html[data-theme-mode="light"] :is(h1,h2,h3,h4,h5,h6,label,strong,th,td,.stat-value,.stat-label,.panel-title,.brand-name,.sidebar-system-name,.terminal-title,.terminal-total,.summary-title,.combo-preview,.drawer-title,.modal-title,.result-number,.accounting-statement-total,.player-footer-group h3) {
 color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;
}
html[data-theme-mode="light"] :is(p,small,.muted,.helper,.helper-text,.stat-helper,.panel-subtitle,.admin-page-description,.admin-identity-chip,.result-note,.terminal-hint,.empty-state,.game-description,.card-description,.summary-line span,.wallet-box span,.wallet-due,.cutoff-meta,.player-footer-bottom,.player-mini-status,.deposit-choice-label,.game-category-heading span,.player-compact-meta,.player-control-label,.field small) {
 color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;
}
html[data-theme-mode="light"] :is(a,.text-button,.auth-link-button,.player-footer-link,.player-footer-links a) {color:var(--theme-primary)!important;}
html[data-theme-mode="light"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea,.input,.select,.textarea,.professional-input,.terminal-input,.admin-nav-search-control) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;
 -webkit-text-fill-color:currentColor!important;border-color:var(--border-strong)!important;
}
html[data-theme-mode="light"] :is(input,textarea)::placeholder {color:var(--theme-muted)!important;opacity:1!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] select option {background:var(--theme-surface)!important;color:var(--theme-text)!important;}
html[data-theme-mode="light"] input:is([type="checkbox"],[type="radio"]) {accent-color:var(--theme-primary)!important;}
html[data-theme-mode="light"] :is(.button,.nav-button,.record-tab,.accounting-view-tab,.ops-tab,.ops-period-button,.ops-analytics-tab,.integration-page-tab,.kyc-filter,.cs-record-tab,.cs-case-main-tab,.support-admin-tab,.payout-category-tab,.account-center-tab,.wallet-action-tab,.wallet-inner-tab,.tab-button,.auth-tab,.vip-tab,.payout-tab,.lobby-category-button,.provider-chip,.icon-button,.icon-action-button,.security-setup-button,.wallet-quick-action,.mobile-bottom-nav-button,.type-btn,.mode-btn,.side-tab,.txn-refresh,.outline-btn,.drawer-action,.drawer-close,.modal-close,.modal-cancel,.menu,.number-btn,.game-logo,.wallet-btn,.youtube-live-button,.gateway-payment-method,.withdrawal-method-card,.game-category-show-all,.game-category-scroll,.game-category-pagination button,.google-sign-in-button,.game-exit-button) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;
 border-color:var(--border-strong)!important;-webkit-text-fill-color:currentColor!important;
}
html[data-theme-mode="light"] :is(.button-primary,.primary-button,.place-btn,.modal-save,.payout-save-button,.wallet-quick-deposit,.wallet-btn.deposit),
html[data-theme-mode="light"] :is(.nav-button,.record-tab,.accounting-view-tab,.ops-tab,.ops-period-button,.ops-analytics-tab,.integration-page-tab,.kyc-filter,.cs-record-tab,.cs-case-main-tab,.support-admin-tab,.payout-category-tab,.account-center-tab,.wallet-action-tab,.wallet-inner-tab,.tab-button,.auth-tab,.vip-tab,.payout-tab,.lobby-category-button,.provider-chip,.mobile-bottom-nav-button,.type-btn,.mode-btn,.side-tab,.number-btn).active {
 background:var(--theme-primary)!important;color:var(--theme-button-text)!important;
 border-color:var(--theme-primary)!important;-webkit-text-fill-color:currentColor!important;
}
html[data-theme-mode="light"] :is(button,.button) :is(strong,span,small,i) {color:inherit!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] .button-danger {background:#b91c1c!important;color:#fff!important;border-color:#b91c1c!important;}
html[data-theme-mode="light"] .button-success {background:#166534!important;color:#fff!important;border-color:#166534!important;}
html[data-theme-mode="light"] :is(button,input,select,textarea):disabled {opacity:1!important;background:var(--light-soft)!important;color:var(--theme-muted)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(button,a,input,select,textarea,[tabindex]):focus-visible {outline:3px solid var(--theme-primary)!important;outline-offset:3px!important;}
html[data-theme-mode="light"] :is(.gateway-payment-method,.withdrawal-method-card).active,
html[data-theme-mode="light"] .withdrawal-method-card[aria-checked="true"],
html[data-theme-mode="light"] .game-logo.active {background:var(--light-selected)!important;border-color:var(--theme-primary)!important;outline-color:var(--theme-primary)!important;}
html[data-theme-mode="light"] :is(table,tbody,tbody tr,tbody td,td,.empty-row) {background:var(--theme-surface)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(thead,thead tr,th),
html[data-theme-mode="light"] :is(.vip-table,.players-tree-table,.accounting-table) thead th {background:var(--light-soft)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] tbody tr:hover td {background:var(--light-selected)!important;}
html[data-theme-mode="light"] :is(.notice,.security-summary,.withdrawal-turnover-notice,.core-status-banner,.validation-box.invalid,.terminal-placement-limit,.deposit-bonus-rules,.provider-game-mapping-notice,.core-api-status-notice,.capacity-return-notice) {background:var(--light-soft)!important;color:var(--theme-text)!important;border-color:var(--border-strong)!important;}
html[data-theme-mode="light"] :is(.status,.status-badge,.vip-status,.core-status-badge,.cs-presence-badge) {background:var(--light-soft)!important;color:var(--theme-text)!important;border-color:var(--border-strong)!important;}
html[data-theme-mode="light"] :is(.status-active,.status-approved,.status-completed,.status-open,.theme-contrast-pass) {background:#f0fdf4!important;color:#166534!important;border-color:#86b99b!important;}
html[data-theme-mode="light"] :is(.status-pending,.status-processing,.status-case_management) {background:#fffbeb!important;color:#854d0e!important;border-color:#b99b61!important;}
html[data-theme-mode="light"] :is(.status-deactivated,.status-rejected,.status-failed,.status-closed,.theme-contrast-status:not(.theme-contrast-pass)) {background:#fef2f2!important;color:#b91c1c!important;border-color:#dca5a5!important;}
html[data-theme-mode="light"] :is(.modal,.modal-overlay,.cs-modal,.ui-dialog-overlay,.drawer-backdrop) {background:rgba(23,32,51,.32)!important;}
html[data-theme-mode="light"] .modal:not(.modal-overlay) > :is(.modal-card,.modal-head) {background:var(--theme-surface)!important;}
/* Keep the actual preview independent from the currently selected Admin theme. */
html[data-theme-mode="light"] .theme-preview {background:var(--preview-bg)!important;color:var(--preview-text)!important;}
html[data-theme-mode="light"] .theme-preview strong {color:var(--preview-text)!important;}
html[data-theme-mode="light"] .theme-preview span {color:var(--preview-muted)!important;}
html[data-theme-mode="light"] .theme-preview button {background:var(--preview-primary)!important;color:var(--preview-button-text)!important;border-color:var(--preview-accent)!important;}
html[data-theme-mode="light"] :is(.featured-game-card,.compact-game-card) {background-color:var(--theme-surface)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(.featured-game-card,.compact-game-card) :is(.game-card-body,.game-info,.game-description) {background:var(--theme-surface)!important;color:var(--theme-text)!important;}
html[data-theme-mode="light"] :is(#view-players,#view-settings) :is(.player-wallet-metric,.player-commission-metric,.player-control-item,.player-upline-box,.commission-schedule-preview,.theme-color-grid label,.logo-preview,.admin-qr-preview) {background:var(--light-soft)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(#withdrawalModal,#walletActionsModal,#accountCenterModal) :is(.modal-card,.withdrawal-popup-stat,.wallet-payment-panel,.wallet-action-tabs,.wallet-inner-tabs,.wallet-action-panel-heading,.wallet-payment-toolbar,.wallet-payment-success,.withdrawal-method-card) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(#withdrawalModal,#walletActionsModal) :is(.withdrawal-popup-stat span,.wallet-payment-method-instructions,.wallet-payment-frame-loading) {color:var(--theme-muted)!important;background:var(--theme-surface)!important;}
html[data-theme-mode="light"] #accountDrawer,html[data-theme-mode="light"] #accountDrawer .drawer-head,
html[data-theme-mode="light"] #accountDrawer .txn-head {background:var(--theme-surface)!important;color:var(--theme-text)!important;}
html[data-theme-mode="light"] #terminalInput {background:var(--theme-surface)!important;color:var(--theme-text)!important;caret-color:var(--theme-primary)!important;}
html[data-theme-mode="light"] :is(.menu-icon span,.menu-icon::before,.menu-icon::after) {background:var(--theme-text)!important;}

/* Theme controls and navigation retain contrast even with older ID-based rules. */
html[data-theme-mode="light"] :is(#adminThemePreview,#playerThemePreview) strong {color:var(--preview-text)!important;}
html[data-theme-mode="light"] :is(#adminThemePreview,#playerThemePreview) span {color:var(--preview-muted)!important;}
html[data-theme-mode="light"] :is(#adminThemePreview,#playerThemePreview) button {background:var(--preview-primary)!important;color:var(--preview-button-text)!important;}
html[data-theme-mode="light"] :is(.admin-nav-group-label,.admin-mini-card span,.admin-mini-card small,.player-mini-card span,.sidebar-header p,.sidebar-footer small,.admin-page-category,.admin-identity-chip,#currentAdminRole,#currentAdminName,.game-wallet-copy span,.game-wallet-copy small,.topbar-copy p) {color:var(--theme-muted)!important;}
html[data-theme-mode="light"] .theme-editor-head .button {flex-shrink:0!important;min-width:62px!important;white-space:nowrap!important;overflow-wrap:normal!important;}
html[data-theme-mode="light"] .theme-color-grid input[type="color"] {background:var(--theme-surface)!important;border:1px solid var(--border-strong)!important;}
html[data-theme-mode="light"] .modal-overlay > .modal {background:var(--theme-surface)!important;color:var(--theme-text)!important;}
/* Legacy backgrounds are replaced as complete backgrounds, including gradients. */
html[data-theme-mode="light"] :is(.app,.modebar,.side-view,.txn-section,.txn-list,.number-grid,.mobile-bottom-nav,.mobile-bottom-nav-panel,.commission-highlight-card,.commission-claim-panel,.handbook-manual-summary,.player-manual-summary,.player-manual-meta,.player-handbook-note,.player-handbook-grid article,.player-handbook-reference > div,.game-wallet-balance-card,.topbar-wallet-card,.payout-channel-heading,.payout-channel-selector,.payout-form-heading,.payout-saved-empty,.payout-channel-details,.payout-channel-control,.vip-badge,.vip-summary,.vip-reward-card,.vip-level-card) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;
}
html[data-theme-mode="light"] :is(.player-handbook-note span,.player-handbook-reference span,.player-manual-summary span,.player-manual-meta b,.player-mini-name,.nav-section-label,.admin-nav-group-label,.cutoff-meta span,.validation-list,.terminal-total,.payout-channel-heading span) {color:var(--theme-muted)!important;}
html[data-theme-mode="light"] .player-handbook-grid article > span {background:var(--light-soft)!important;color:var(--theme-accent)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(#gamesDepositButton,#gamesWithdrawButton,#desktopSidebarToggle,#mobileMenuButton,#playerNotificationButton,#adminNotificationButton) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border-strong)!important;box-shadow:none!important;
}
html[data-theme-mode="light"] #gamesDepositButton {background:var(--theme-primary)!important;color:var(--theme-button-text)!important;border-color:var(--theme-primary)!important;}
html[data-theme-mode="light"] #headerBrandHomeButton :is(strong,span,small),html[data-theme-mode="light"] #topbarPlayerStatus {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] .game-wallet-balance-card :is(strong,span,small) {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] :is(#gamesDepositButton,#gamesWithdrawButton) :is(span,strong,i) {color:inherit!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] :is(.modal:not(.hidden),.modal:not(.hidden) .modal-card,.cs-modal:not(.hidden) .cs-modal-card,.ui-dialog-overlay:not(.hidden),.ui-dialog-overlay:not(.hidden) .ui-dialog-card,.auth-screen:not(.hidden),.auth-screen:not(.hidden) .auth-card,.support-popup-view[aria-hidden="false"] .support-popup-card) {opacity:1!important;animation:none!important;transform:none!important;will-change:auto!important;}
html[data-theme-mode="light"] :is(.support-chat-launcher:not([hidden]),.topbar,.sidebar,.player-manual-actions .button,.notification-button,.sidebar-collapse-button,.nav-button,.mobile-bottom-nav) {animation:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html[data-theme-mode="light"] .brand-fallback {background:var(--light-soft)!important;color:var(--theme-accent)!important;}
html[data-theme-mode="light"] :is(.security-item,.security-ring,.security-ring::before,.security-ring::after,.security-check,.security-eligibility-badge,.payout-channel-hero,.payout-manager-heading,.payout-method-form,.payout-channel-status,.payout-dropdown-trigger,.payout-dropdown-trigger-icon,.payout-dropdown-count,.payout-channel-dropdown,.payout-channel-option,.payout-channel-search,.payout-security-seal,.gateway-wallet-router-summary,.gateway-wallet-note,.gateway-wallet-note-card,.commission-cycle-panel,.vip-hero,.vip-offer,.compact-game-copy,.compact-game-fallback,.game-lobby-empty,.validation-box h4) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(.sidebar-nav-section,.admin-mini-role,.payout-eyebrow,.payout-channel-status,.security-ring span,.security-eligibility-badge,.security-check,.field-label,.txn-empty,.gateway-wallet-updated,.gateway-wallet-router-summary span,.gateway-wallet-router-summary strong,.compact-game-copy span,.vip-hero span,.vip-offer span) {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] :is(#adminDetails,#adminMiniName,#adminMiniRole,#gamesWalletAmount,#securityPercentage,#dashboardGatewayWalletUpdated,#payoutChannelAvailabilityStatus) {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] :is(#view-payout-channels,#view-profile,#view-vip-rewards) :is(.panel,.security-item,.security-ring::after,.payout-manager-heading,.payout-channel-hero,.payout-method-form,.payout-channel-status,.payout-dropdown-trigger,.payout-dropdown-trigger-icon,.payout-dropdown-count,.vip-hero,.vip-offer) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] #withdrawalModal .field-label {color:var(--theme-text)!important;}
html[data-theme-mode="light"] #view-vip-rewards progress::-webkit-progress-bar {background:var(--light-soft)!important;}
html[data-theme-mode="light"] #view-vip-rewards progress::-webkit-progress-value {background:var(--theme-primary)!important;}
html[data-theme-mode="light"] #view-vip-rewards progress::-moz-progress-bar {background:var(--theme-primary)!important;}
html[data-theme-mode="light"] #view-vip-rewards .vip-inactive {opacity:1!important;color:var(--theme-muted)!important;}
html[data-theme-mode="light"] :is(.compact-game-card,.featured-game-card) {color:var(--theme-text)!important;box-shadow:none!important;}
html[data-theme-mode="light"] :is(.compact-game-card,.featured-game-card) :is(strong,span) {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] :is(#sidebarBrandFallback,#securityEligibilityStatus,#savedPayoutMethodCount,.eyebrow,.payout-method-count) {color:var(--theme-accent)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #view-payout-channels :is(.payout-form-footer,.payout-saved-heading,.payout-empty-icon,.payout-method-count,.payout-security-seal) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] #view-payout-channels :is(small,.payout-form-footer p) {color:var(--theme-muted)!important;}
html[data-theme-mode="light"] #view-profile .security-item {opacity:1!important;}
html[data-theme-mode="light"] #withdrawalModal :is(.field-label,label,.withdrawal-method-card strong) {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] .validation-panel {background:var(--light-soft)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] :is(#placeKeyBtn,#placeManualBtn):disabled {background:var(--light-soft)!important;color:var(--theme-muted)!important;border-color:var(--border)!important;opacity:1!important;}
html[data-theme-mode="light"] body .topbar :is(button,.game-wallet-balance-card) {box-shadow:none!important;}
html[data-theme-mode="light"] #gameLobby :is(.compact-game-copy,.compact-game-fallback,.game-lobby-empty,.game-category-show-all,.game-category-scroll,.game-category-pagination button) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border-strong)!important;}
html[data-theme-mode="light"] #gameLobby :is(.compact-game-copy strong,.compact-game-copy span,.game-section-kicker,.game-category-heading span) {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #refreshLobbyGamesButton {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border-strong)!important;}
html[data-theme-mode="light"] #paymentMethodForm .field small {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;opacity:1!important;}
html[data-theme-mode="light"] #view-payout-channels :is(.payout-saved-panel span,.payout-saved-panel strong,.payout-saved-panel small) {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #paymentMethodForm .field,
html[data-theme-mode="light"] #gameLobby #lobbyAnnouncement,
html[data-theme-mode="light"] #gameLobby .lobby-sticky-search {background:var(--theme-surface)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] #gameLobby #lobbyAnnouncement :is(span,strong),
html[data-theme-mode="light"] #paymentMethodForm .payout-form-footer span {color:var(--theme-muted)!important;}
/* Keep the security score ring meaningful; only decorative gradients are removed. */
html[data-theme-mode="light"] #view-profile .security-ring {
 background:radial-gradient(circle at center,var(--theme-surface) 55%,transparent 57%),conic-gradient(var(--theme-primary) var(--score,0%),var(--border) 0)!important;
}
html[data-theme-mode="light"] #lobbyFilterCount {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #gameLobby :is(.lobby-category-nav,.compact-game-media,.game-provider-section) {background:var(--theme-surface)!important;border-color:var(--border)!important;box-shadow:none!important;}
html[data-theme-mode="light"] #gameLobby #lobbyStickySearch {box-shadow:none!important;}
/* Admin record screens include older local colors; keep text paired with light surfaces. */
html[data-theme-mode="light"] #dashboardScreen .view :is(h1,h2,h3,h4,strong,b,label,th,td,span,li,.empty-row,.subheading,.logo-preview-placeholder,.game-layout-editor-note,.layout-preview-empty) {color:var(--theme-text)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(p,small,.muted,.helper,.record-clear-note,.accounting-period-label,.core-admin-uid-value,.ops-health-summary,.gateway-wallet-updated) {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(a,.button) {color:var(--theme-text)!important;}
html[data-theme-mode="light"] #dashboardScreen .view .button-primary {color:var(--theme-button-text)!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(.button-success,.button-danger) {color:#fff!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(button,.button) :is(span,strong,small,i) {color:inherit!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #view-settings :is(#adminThemePreview,#playerThemePreview) strong {color:var(--preview-text)!important;}
html[data-theme-mode="light"] #view-settings :is(#adminThemePreview,#playerThemePreview) span {color:var(--preview-muted)!important;}
html[data-theme-mode="light"] #view-settings :is(#adminThemePreview,#playerThemePreview) button {color:var(--preview-button-text)!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(.accounting-explainer,.accounting-kpi,.core-admin-uid-value,.support-queue-toolbar,.support-queue-head,.support-queue-sidebar,.support-messenger-layout,.support-admin-chat,.support-chat-messages,.cs-live-conversation-reference,.game-layout-preview-column,.game-layout-preview-device,.game-layout-preview-stage,.game-layout-preview-toolbar,.game-layout-preview-browser,.layout-preview-empty) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] #view-draws .panel {background:var(--theme-surface)!important;color:var(--theme-text)!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(button,.button):disabled {background:var(--light-soft)!important;color:var(--theme-muted)!important;opacity:1!important;}
html[data-theme-mode="light"] #dashboardScreen .view :is(#adminThemeContrastStatus,#playerThemeContrastStatus).theme-contrast-pass {color:#166534!important;}
html[data-theme-mode="light"] #view-layout :is(.layout-preview-section,.layout-preview-card,.layout-preview-card-media) {background:var(--theme-surface)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] #view-layout .layout-preview-card-copy :is(b,i) {background:var(--theme-muted)!important;}
html[data-theme-mode="light"] #view-support :is(.support-message,.support-message-bubble,.support-chat-messages,.support-composer,.support-chat-form,.support-resolution-panel,.cs-chat-empty,.cs-case-panel,.cs-history-header,.cs-note-agent-line) {background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--border)!important;}
html[data-theme-mode="light"] #logoPreview {background:var(--theme-surface)!important;}
html[data-theme-mode="light"] #logoPreview .logo-preview-placeholder {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;opacity:1!important;}
html[data-theme-mode="light"] #dashboardScreen .view .button-danger {background:#b91c1c!important;border-color:#b91c1c!important;color:#fff!important;}
html[data-theme-mode="light"] #dashboardScreen .view .button-success {background:#166534!important;border-color:#166534!important;color:#fff!important;}
html[data-theme-mode="light"] #view-draws #adminGameCatalogGrid .placeholder-card {color:var(--theme-muted)!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme-mode="light"] #lobbyAnnouncementTextClone {display:none!important;}
html[data-theme-mode="light"] #lobbyAnnouncement .announcement-track {display:block!important;animation:none!important;transform:none!important;white-space:normal!important;}
html[data-theme-mode="light"] #lobbyAnnouncementText {white-space:normal!important;}
