/* The dark palette is the site's original black and gold. Only light mode
   overrides content surfaces; artwork, video and QR pixels are never filtered. */
:root { --theme-menu-shadow: 0 12px 36px rgb(0 0 0 / 26%); }
html[data-baoku-theme="dark"] { color-scheme: dark; }
html[data-baoku-theme="light"] {
  color-scheme: light;
  --ui-bg: #f5f4ef; --ui-surface: #fff; --ui-surface-raised: #f1efe6; --ui-surface-soft: #f8f7f2;
  --ui-border: #e0dfd5; --ui-border-strong: #c9c5b5; --ui-text: #252c26; --ui-text-soft: #626b62;
  --ui-gold: #d8bd75; --ui-gold-hover: #c9aa57; --ui-green: #26764b;
  --theme-accent: #806018; --theme-menu-shadow: 0 12px 36px rgb(57 49 23 / 13%);
}
.baoku-theme-switcher { position: relative; flex: 0 0 auto; font: 13px/1.4 system-ui, sans-serif; }
.baoku-theme-switcher .baoku-theme-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px;
  padding: 0 11px; border: 1px solid var(--ui-border, #34392f); border-radius: 9px;
  background: var(--ui-surface, #101513); color: var(--ui-text, #f3f0e7); cursor: pointer;
  font: inherit; white-space: nowrap; box-shadow: none;
}
.baoku-theme-icon { display: inline-flex; width: 20px; align-items: center; justify-content: center; line-height: 1; }
.baoku-theme-symbol { display: block; width: 20px; height: 20px; flex: none; }
.baoku-theme-switcher .baoku-theme-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 12500; min-width: 146px;
  padding: 6px; border: 1px solid var(--ui-border, #34392f); border-radius: 12px;
  background: var(--ui-surface, #101513); box-shadow: var(--theme-menu-shadow);
}
.baoku-theme-menu[hidden] { display: none !important; }
.baoku-theme-switcher .baoku-theme-option {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 39px; margin: 0;
  padding: 8px 10px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ui-text, #f3f0e7); font: inherit; text-align: left; cursor: pointer;
}
.baoku-theme-option > span:first-child { display: inline-flex; width: 20px; align-items: center; justify-content: center; }
.baoku-theme-switcher .baoku-theme-option:hover { background: var(--ui-surface-raised, #151b18); }
.baoku-theme-switcher .baoku-theme-option[aria-checked="true"] { background: #d8bd752b; color: #e6cd8a; }
html[data-baoku-theme="light"] .baoku-theme-switcher .baoku-theme-option[aria-checked="true"] { background: #f1e8cf; color: #73530e; }
.baoku-theme-switcher button:focus-visible { outline: 2px solid #ae8730; outline-offset: 3px; }
.baoku-theme-floating { position: fixed; top: 18px; right: 20px; z-index: 60; }
.admin-user > .baoku-theme-switcher { margin-left: 10px; }

html[data-baoku-theme="light"],
html[data-baoku-theme="light"] body,
html[data-baoku-theme="light"] #root,
html[data-baoku-theme="light"] .app-shell,
html[data-baoku-theme="light"] .page-shell,
html[data-baoku-theme="light"] .library-page,
html[data-baoku-theme="light"] .help-shell,
html[data-baoku-theme="light"] .help-page,
html[data-baoku-theme="light"] .admin-shell,
html[data-baoku-theme="light"] .admin-login-page {
  color: var(--ui-text); background: var(--ui-bg); background-image: none;
}
/* This fixed decoration and its black pseudo-element overlays sit above the
   app background. Omit the decoration in daylight, not the game-cover images.
   Pseudo-elements must be explicit selectors; they cannot be inside :is(). */
html[data-baoku-theme="light"] .site-cover-backdrop { display: none; background: var(--ui-bg); }
html[data-baoku-theme="light"] .site-cover-backdrop::before,
html[data-baoku-theme="light"] .site-cover-backdrop::after { content: none; background: none; }
html[data-baoku-theme="light"] .search-hero { background: transparent; }
html[data-baoku-theme="light"] .search-hero h1 { color: #252c26; text-shadow: none; }
html[data-baoku-theme="light"] .hero-title-block p { color: #626b62; }
html[data-baoku-theme="light"] .topbar {
  background: rgb(255 255 255 / 94%); border-color: var(--ui-border); box-shadow: 0 2px 12px rgb(40 41 23 / 5%);
}
html[data-baoku-theme="light"] :is(.brand-lockup strong, .admin-sidebar .brand, .resource-delivery-provider) { color: var(--theme-accent); }
html[data-baoku-theme="light"] :is(.brand-lockup span, .brand-mark) { color: var(--theme-accent); background: #f6f2e6; border-color: #daceac; box-shadow: none; }
html[data-baoku-theme="light"] :is(.hero-kicker, .game-share-kicker, .help-kicker, .help-section-heading span, .help-footer-card > div > span, .eyebrow, .baoku-cookie-created-at, .baoku-insights-kicker) { color: var(--theme-accent); }
html[data-baoku-theme="light"] :is(.top-share-button, .free-top-status, .top-actions button, .back-button, .ghost-action, .ghost-button, .secondary-admin-button) {
  color: var(--ui-text) !important; background: var(--ui-surface) !important; border-color: var(--ui-border) !important;
}
html[data-baoku-theme="light"] :is(.game-card, .game-card-body, .taxonomy-explorer, .ranking-panel, .game-surprise-card, .detail-hero, .detail-section, .entry-list, .detail-resource-list, .detail-help-callout, .game-share-card, .admin-card, .netdisk-card, .admin-login-card, .provider-order-panel, .admin-metric-card, .cookie-summary-strip, .quick-start, .help-explorer, .help-footer-card, .help-hero, .baoku-insights-hero, .baoku-insight-metric, .baoku-insights-card, .baoku-bucket-detail) {
  color: var(--ui-text); background: var(--ui-surface); border-color: var(--ui-border); box-shadow: 0 2px 8px rgb(40 41 23 / 3%);
}
html[data-baoku-theme="light"] :is(.detail-resource-list, .help-hero) { border-color: #d6caa8; }
html[data-baoku-theme="light"] .detail-backdrop { opacity: .09; }
/* The original hero has a separate, near-black ::after gradient above its
   artwork. Changing the image opacity alone does not lighten that layer. */
html[data-baoku-theme="light"] .detail-hero::after {
  background: linear-gradient(90deg, #fff 0%, rgb(255 255 255 / 94%) 48%, rgb(255 255 255 / 82%) 100%);
}
html[data-baoku-theme="light"] .detail-hero .detail-title-block h1 { color: #252c26; }
html[data-baoku-theme="light"] .detail-hero .detail-title-block p { color: #626b62; }
html[data-baoku-theme="light"] .detail-title-block .eyeline { color: var(--theme-accent); }
html[data-baoku-theme="light"] .access-quota-pill.is-free { color: #267044; background: #e7f3e9; border-color: #a4cbb0; }
html[data-baoku-theme="light"] .help-hero-glow { opacity: .2; }
html[data-baoku-theme="light"] :is(.app-shell, .admin-shell, .admin-login-page) :is(h1, h2, h3, h4, strong) { color: var(--ui-text); text-shadow: none; }
html[data-baoku-theme="light"] :is(.app-shell, .admin-shell, .admin-login-page) :is(p, small, label) { color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(.game-card-body p, .detail-title-block p, .detail-section p, .article-content-blocks, .article-content-blocks li, .entry-row span, .help-answer, .help-answer li, .help-article-trigger, .help-article-title > span, .help-article-title small, .help-result-count, .help-footer, .empty-state, .baoku-empty, .baoku-device-meta, .baoku-source-name, .baoku-source-count, .baoku-insights-legend, .baoku-pages-table td, .source-cookie-identity span, .source-cookie-identity small, .source-cookie-quota > div:first-child, .transfer-data-main span, .transfer-data-row time, .admin-user, .field-help) { color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(.detail-breadcrumb, .detail-breadcrumb button, .taxonomy-breadcrumb, .ranking-number, .help-article-index, .quick-step-number, .transfer-provider, .baoku-pages-table .path, .baoku-pages-table .num, .baoku-cookie-rename-button, .baoku-cookie-created-at) { color: var(--theme-accent); }
html[data-baoku-theme="light"] :is(.search-command, .help-search, .transfer-search > div) { background: var(--ui-surface); border-color: var(--ui-border-strong); color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(.search-command, .help-search) input { color: var(--ui-text); background: transparent; }
html[data-baoku-theme="light"] input::placeholder, html[data-baoku-theme="light"] textarea::placeholder { color: #777e73; opacity: 1; }
html[data-baoku-theme="light"] :is(.admin-shell, .admin-login-page, .baoku-cookie-name-field, .baoku-cookie-label-editor) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select) { color: var(--ui-text); background: #fff; border-color: var(--ui-border-strong); }
html[data-baoku-theme="light"] :is(.taxonomy-tabs, .period-tabs, .help-categories button, .taxonomy-chip-list > button, .taxonomy-expand-button, .detail-tags > span, .detail-tags > button, .detail-resource-list .entry-row, .help-article, .quick-step-grid li, .source-cookie-row, .cookie-proxy-summary, .cookie-proxy-mode, .cookie-proxy-editor-wrap, .provider-order-list li, .transfer-cleanup-drawer, .transfer-cleanup-options article, .baoku-detail-metrics > div, .baoku-detail-section, .baoku-insights-periods, .baoku-insights-periods button, .baoku-insights-refresh, .baoku-detail-head button) {
  color: var(--ui-text); background: var(--ui-surface-soft); border-color: var(--ui-border);
}
html[data-baoku-theme="light"] :is(.taxonomy-tabs button, .period-tabs button, .ranking-tabs button, .source-cookie-actions button, .cookie-proxy-actions button, .provider-order-actions button) { color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(.taxonomy-chip-list > button.active, .taxonomy-chip-list > button:hover, .help-categories button.is-active, .help-article.is-open, .admin-sidebar nav a.active, .admin-sidebar nav a[aria-current="page"], .compact-toggle, .admin-card .cookie-proxy-mode label.active, .baoku-cookie-rename-button) { color: #73530e; background: #f1e8cf; border-color: #d9c68d; }
html[data-baoku-theme="light"] :is(.primary-button, .primary-action, .search-command button, .detail-resource-list .entry-row > button, .taxonomy-tabs button.active, .period-tabs button.active, .game-share-primary, .help-hero-action, .help-footer-card > a, .baoku-insights-periods button.active) { color: #292618; background: var(--ui-gold); border-color: #bca05b; box-shadow: none; }
html[data-baoku-theme="light"] :is(.admin-sidebar, .help-article-trigger:hover, .help-article-trigger:focus-visible) { background: var(--ui-surface); border-color: var(--ui-border); }
html[data-baoku-theme="light"] :is(.admin-sidebar nav a, .admin-sidebar > button, .provider-order-provider, .provider-order-actions button, .cookie-proxy-fieldset legend, .cookie-proxy-mode label, .transfer-selection-bar label) { color: var(--ui-text); }
html[data-baoku-theme="light"] :is(.source-cookie-icon, .cookie-proxy-icon, .provider-order-icon, .quick-step-icon, .baoku-insight-metric-icon) { color: var(--theme-accent); background: #f2ebd6; }
html[data-baoku-theme="light"] :is(.cookie-usage-meter, .provider-stat-meter, .baoku-device-track) { background: #e5e7df; border-color: #c9cebf; }
html[data-baoku-theme="light"] :is(.cookie-usage-meter span, .provider-stat-meter span) { background: #ad8b35; }
html[data-baoku-theme="light"] :is(.netdisk-health-panel, .help-note, .cookie-proxy-validation, .notice, .source-cookie-health-alert) { color: #71531b; background: #faf2df; border-color: #dec993; }
html[data-baoku-theme="light"] :is(.notice.success, .netdisk-health-panel.healthy, .cookie-proxy-test-result.success, .transfer-status.success, .status-badge.ready) { color: #267044; background: #e7f3e9; border-color: #a4cbb0; }
html[data-baoku-theme="light"] :is(.danger-button, .danger-icon, .status-badge.invalid, .transfer-status.failed, .source-cookie-error, .cookie-proxy-test-result.failed) { color: #a63e33; background: #faece7; border-color: #dfb0a7; }
html[data-baoku-theme="light"] :is(.status-badge.warning, .status-badge.waiting, .source-cookie-health-badge) { color: #805b16; background: #f4ebd2; }
html[data-baoku-theme="light"] :is(.ranking-list li + li, .ranking-heading, .transfer-data-row, .analytics-table th, .analytics-table td, .baoku-pages-table td, .baoku-pages-table th, .baoku-detail-page-row, .help-accordion) { border-color: var(--ui-border); }
html[data-baoku-theme="light"] .baoku-analytics-v2 { --insight-gold: #957019; --insight-gold-soft: #806018; --insight-green: #277b50; --insight-blue: #3a6eb2; --insight-purple: #8253b3; --insight-muted: #687064; }
html[data-baoku-theme="light"] :is(.baoku-insights-updated, .baoku-click-hint, .baoku-detail-head span, .baoku-pages-table th) { color: #687064; }
html[data-baoku-theme="light"] :is(.baoku-detail-source-row, .baoku-detail-page-row) { background: transparent; }
html[data-baoku-theme="light"] :is(.baoku-pages-table tbody tr:hover td, .help-article-trigger:hover) { background: #f5f2e8; }

/* Both resource overlays are attached to body, outside the React app shell. */
html[data-baoku-theme="light"] :is(.resolve-verification-backdrop, .resource-delivery-backdrop, .modal-backdrop, .lightbox-backdrop) { background: rgb(33 39 32 / 42%); }
html[data-baoku-theme="light"] :is(.resolve-verification-dialog, .resource-delivery-dialog, .modal-panel, .blind-box-modal, .site-action-toast, .template-toast, .resource-request-notice) { color: var(--ui-text); background: #fffefa; border-color: #d4c9ac; box-shadow: 0 20px 70px rgb(42 41 30 / 18%); }
html[data-baoku-theme="light"] :is(.resolve-verification-dialog h2, .resource-delivery-dialog h2, .resource-delivery-dialog h3) { color: var(--ui-text); }
html[data-baoku-theme="light"] :is(.resolve-verification-dialog p, .resource-delivery-description, .resource-delivery-game, .resource-delivery-code) { color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(.resolve-verification-close, .resource-delivery-close, .resource-delivery-code button) { color: var(--theme-accent); background: #f3eddc; border-color: #d9cba4; }
html[data-baoku-theme="light"] .resource-delivery-card { color: var(--ui-text); background: #f8f6ee; border-color: #e2ddca; }
html[data-baoku-theme="light"] .resource-delivery-code strong { color: #805d15; }
html[data-baoku-theme="light"] .resource-delivery-open { color: #292618; background: var(--ui-gold); }
html[data-baoku-theme="light"] .resource-request-error { color: #8b3e29; border-color: #d9ad9b; }
html[data-baoku-theme="light"] :is(.free-top-status svg, .free-mode-label svg) { color: #26764b; }
html[data-baoku-theme="light"] .resource-delivery-qr-frame { background: #fff; }
html[data-baoku-theme="light"] .baoku-theme-switcher { color: var(--ui-text); }
html[data-baoku-theme="light"] .baoku-theme-switcher .baoku-theme-option { color: var(--ui-text) !important; background: transparent !important; }
html[data-baoku-theme="light"] .baoku-theme-switcher .baoku-theme-option[aria-checked="true"] { color: #73530e !important; background: #f1e8cf !important; }
html[data-baoku-theme="light"] :is(.site-language-menu, .search-results-panel, .blindbox-dialog, .modal-card, .legacy-share-card, .bookmark-reminder-toast) { color: var(--ui-text); background: #fffefa; border-color: var(--ui-border-strong); box-shadow: var(--theme-menu-shadow); }
html[data-baoku-theme="light"] .site-language-trigger svg { stroke: var(--theme-accent); }
html[data-baoku-theme="light"] .site-language-menu button[aria-checked="true"] { color: #73530e !important; background: #f1e8cf !important; }
html[data-baoku-theme="light"] :is(.search-results-list button, .blindbox-controls, .blindbox-reveal, .blindbox-placeholder, .blindbox-result) { color: var(--ui-text); background: var(--ui-surface-soft); border-color: var(--ui-border); }
html[data-baoku-theme="light"] :is(.search-result-title, .search-result-title mark, .search-results-summary p strong, .ranking-copy strong, .blindbox-result-copy h3, .blindbox-placeholder-content > strong, .blindbox-control-copy > strong) { color: var(--ui-text); }
html[data-baoku-theme="light"] :is(.search-result-title > small, .search-result-date, .ranking-copy small, .ranking-heading small, .ranking-empty, .blindbox-header p, .blindbox-result-copy p, .blindbox-control-copy > small, .blindbox-placeholder-content > small) { color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(.search-result-category, .search-result-action, .search-results-count, .ranking-caret, .ranking-list li:nth-child(-n+3) .ranking-number, .surprise-kicker, .detail-help-callout-action, .detail-help-callout-copy small) { color: var(--theme-accent); }
html[data-baoku-theme="light"] .blindbox-backdrop { background: rgb(33 39 32 / 42%); }
html[data-baoku-theme="light"] :is(.blindbox-close, .blindbox-actions button, .modal-heading button) { color: var(--theme-accent); background: #f3eddc; border-color: #d9cba4; }
html[data-baoku-theme="light"] :is(.notice-line, .search-results-summary, .search-results-summary-icon) { color: #71531b; background: #f4eedc; border-color: #dec993; }
html[data-baoku-theme="light"] :is(.blindbox-draw-button, .blindbox-actions button:first-child, .ranking-tabs button.active, .surprise-action) { color: #292618; background: var(--ui-gold); border-color: #bca05b; }

/* Daylight surface audit: state panels and nested content need their own solid
   surface, not the original dark alpha layers painted onto a white parent. */
html[data-baoku-theme="light"] :is(
  .help-accordion, .help-article-panel, .help-answer, .help-empty,
  .empty-state, .section-loading, .loading-state, .taxonomy-page-loading,
  .search-loading, .search-error, .taxonomy-empty, .taxonomy-error,
  .baoku-insights-loading, .baoku-insights-error, .analytics-loading,
  .more-games-prompt, .taxonomy-pagination,
  .cookie-proxy-fieldset, .number-control, .mode-control,
  .number-control-input, .mode-choice-row label,
  .cookie-usage-panel, .cookie-usage-row, .cookie-candidate-panel, .cookie-candidate-row,
  .admin-toolbar, .admin-summary-card, .admin-action-card, .admin-payment-config,
  .admin-credential-config, .admin-default-lock, .admin-list, .admin-row,
  .admin-row-extra, .admin-grid section, .purchase-card, .order-result,
  .generated-codes, .activation-code-result
) {
  color: var(--ui-text); background: var(--ui-surface);
  border-color: var(--ui-border); box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-baoku-theme="light"] .route-loading {
  color: var(--ui-text); background: var(--ui-bg); background-image: none;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-baoku-theme="light"] :is(
  .article-note, .version-section p, .help-note,
  .source-cookie-compat-note, .credential-hints, .cookie-proxy-auth-toggle,
  .toggle-row, .admin-channel-toggle, .admin-callbacks, .admin-warning-note,
  .admin-credential-status span, .admin-hero-badge,
  .free-provider-list > span, .number-control-input b,
  .help-result-count, .help-article-index, .bookmark-reminder-toast kbd
) {
  color: #665128; background: #f7f2e5; border-color: #ded3b6; box-shadow: none;
}
html[data-baoku-theme="light"] :is(.help-answer, .help-article-panel, .article-note, .version-section) :is(p, li, span, strong, small, code) {
  color: var(--ui-text);
}
html[data-baoku-theme="light"] :is(.help-answer, .article-content-blocks) a { color: #71530f; text-decoration: underline; text-underline-offset: 3px; }
html[data-baoku-theme="light"] .help-answer { border-left-color: #b99c57; }
html[data-baoku-theme="light"] :is(
  .empty-state, .section-loading, .loading-state, .taxonomy-page-loading,
  .search-loading, .search-error, .taxonomy-empty, .taxonomy-error,
  .baoku-insights-loading, .baoku-insights-error, .analytics-loading
) :is(p, small, strong, span) { color: var(--ui-text-soft); }
html[data-baoku-theme="light"] :is(
  .loading-emblem, .detail-help-callout-icon, .legacy-share-mark,
  .bookmark-reminder-mark, .baoku-detail-empty-icon, .blindbox-orbit
) { color: #806018; background: #f3ecd9; border-color: #d9c994; box-shadow: none; }
html[data-baoku-theme="light"] :is(.taxonomy-tabs-placeholder span, .taxonomy-placeholder-chips span, .ranking-loading span) {
  background: #e8e7de; background-image: none; box-shadow: none;
}
html[data-baoku-theme="light"] .loading-state::before { content: none; background: none; }
html[data-baoku-theme="light"] .loading-dots span { background: #806018; }
html[data-baoku-theme="light"] .taxonomy-page-loading-spinner { border-color: #dfd7c1; border-top-color: #806018; }
html[data-baoku-theme="light"] :is(.spinner, .baoku-insights-loader) { border-color: #dfd7c1; border-top-color: #806018; }
html[data-baoku-theme="light"] :is(
  .more-games-prompt:hover, .more-games-prompt:focus-visible,
  .taxonomy-pagination button, .ui-intro-toggle,
  .game-share-secondary, .bookmark-reminder-close,
  .admin-filter-tabs button, .admin-clean-action, .admin-pager button,
  .admin-row button, .admin-row-details summary,
  .payment-buttons button, .admin-generate button, .admin-toolbar button,
  .admin-password-reset button, .admin-payment-config button,
  .baoku-cookie-label-editor button, .transfer-refresh-button,
  .help-search button, .baoku-insights-error button
) { color: #71530f; background: #f3eddc; border-color: #d9cba4; box-shadow: none; }
html[data-baoku-theme="light"] :is(
  .taxonomy-pagination button:hover, .ui-intro-toggle:hover, .game-share-secondary:hover,
  .admin-sidebar nav a:hover, .cookie-proxy-mode label:hover,
  .baoku-cookie-label-editor button:hover, .transfer-refresh-button:hover:not(:disabled)
) { color: #4e3c16; background: #ece2c7; border-color: #c2a968; }
html[data-baoku-theme="light"] :is(.mode-choice-row label.selected, .admin-filter-tabs button.active) {
  color: #4e3c16; background: #ece2c7; border-color: #c2a968;
}
html[data-baoku-theme="light"] :is(.admin-user, .transfer-filter-bar, .transfer-selection-bar, .blindbox-result-hud) {
  color: var(--ui-text-soft); background: var(--ui-surface-soft); border-color: var(--ui-border);
}
html[data-baoku-theme="light"] :is(.source-cookie-row.suspected_invalid, .source-cookie-error.suspected-invalid, .netdisk-health-panel.invalid, .cookie-candidate-row.invalid em, .baoku-cookie-notice.is-error) {
  color: #8d392e; background: #faeeeb; border-color: #deb6aa; box-shadow: none;
}
html[data-baoku-theme="light"] :is(.baoku-cookie-notice, .cookie-candidate-row em, .cookie-proxy-test-result.success) {
  color: #267044; background: #e7f3e9; border-color: #a4cbb0;
}
html[data-baoku-theme="light"] .cookie-proxy-test-result.failed { color: #8d392e; background: #faeeeb; border-color: #deb6aa; }
html[data-baoku-theme="light"] .resolve-verification-test-notice {
  color: #71531b !important; background: #faf2df; border-color: #dec993;
}
html[data-baoku-theme="light"] .resolve-verification-unavailable { color: #8d392e; background: #faeeeb; border-color: #deb6aa; }
html[data-baoku-theme="light"] :is(.modal-form, .admin-generate, .admin-password-reset, .admin-payment-config) :is(input, textarea) {
  color: var(--ui-text); background: var(--ui-surface); border-color: var(--ui-border-strong);
}
html[data-baoku-theme="light"] :is(.cover-fallback, .article-content-image) { background-color: #e8e7df; }
html[data-baoku-theme="light"] .cover-fallback { background-image: none; }
html[data-baoku-theme="light"] :is(.hero-login-button, .lightbox-close, .lightbox-nav, .source-pill, .status-pill, .limited-offer) {
  color: #665128; background: #f7f2e5; border-color: #ded3b6;
}
html[data-baoku-theme="light"] .source-pill.admin { color: #375c91; background: #eaf0f9; border-color: #c2d0e4; }
html[data-baoku-theme="light"] :is(.source-pill.payment, .status-pill.paid, .status-pill.fresh) { color: #267044; background: #e7f3e9; border-color: #a4cbb0; }
html[data-baoku-theme="light"] :is(.status-pill.pending, .status-pill.used) { color: #71531b; background: #faf2df; border-color: #dec993; }
html[data-baoku-theme="light"] .status-pill.disabled { color: #626b62; background: #eeefe9; border-color: #cdd0c6; }
html[data-baoku-theme="light"] .screenshot-rail button { background: #fff; border-color: var(--ui-border); }
html[data-baoku-theme="light"] :is(.entry-download-link, .activate-form .primary-action) { color: #292618; background: var(--ui-gold); border-color: #bca05b; }

/* No frosted glass or heavy black shadows in daylight. The selectors target
   presentation containers, never the colors of embedded media. */
html[data-baoku-theme="light"] :is(
  .topbar, .hero-command-panel, .search-command, .search-command:focus-within, .taxonomy-explorer,
  .search-results-summary, .search-results-panel, .ranking-panel,
  .game-surprise-card, .game-surprise-card:hover, .game-surprise-card:focus-visible,
  .game-card, .game-card:hover, .game-card:focus-within, .game-card.selected,
  .detail-hero, .detail-hero .cover-image, .detail-hero .cover-fallback,
  .entry-list.detail-resource-list, .detail-resource-list, .detail-section,
  .admin-card, .netdisk-card, .admin-login-card,
  .help-hero, .quick-start, .help-explorer, .help-footer-card,
  .blindbox-controls, .blindbox-reveal, .blindbox-placeholder, .blindbox-result,
  .baoku-insights-hero, .baoku-insight-metric, .baoku-insights-card,
  .baoku-bucket-detail, .baoku-device-track span, .source-cookie-health-alert,
  .source-cookie-icon, .cookie-proxy-editor-wrap, .period-tabs button.active,
  .admin-card .cookie-proxy-mode label.active, .limited-offer
) { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-baoku-theme="light"] .topbar { background: #fff; }
html[data-baoku-theme="light"] :is(
  .resource-delivery-dialog, .resolve-verification-dialog, .modal-card,
  .blindbox-dialog, .legacy-share-card, .bookmark-reminder-toast,
  .site-action-toast, .template-toast, .resource-request-notice,
  .site-language-menu, .baoku-theme-menu
) { box-shadow: 0 6px 24px rgb(55 49 29 / 10%); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-baoku-theme="light"] :is(.resource-delivery-backdrop, .resolve-verification-backdrop, .modal-backdrop, .lightbox-backdrop, .blindbox-backdrop) {
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-baoku-theme="light"] .baoku-insight-metric::after,
html[data-baoku-theme="light"] .game-surprise-card::after,
html[data-baoku-theme="light"] .game-share-card::after,
html[data-baoku-theme="light"] .help-hero-glow { display: none; }
html[data-baoku-theme="light"] .baoku-source-donut svg,
html[data-baoku-theme="light"] .baoku-chart-line,
html[data-baoku-theme="light"] .baoku-chart-bar:hover .baoku-chart-column,
html[data-baoku-theme="light"] .baoku-chart-bar.is-selected .baoku-chart-column { filter: none; }
html[data-baoku-theme="light"] :is(.blindbox-result-hud i, .ranking-icon) { box-shadow: none; }

@media (max-width: 640px) {
  .baoku-theme-label { display: none; }
  .baoku-theme-switcher .baoku-theme-trigger { width: 36px; min-height: 36px; padding: 0; }
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .top-actions { gap: 5px; flex-wrap: nowrap; }
  .top-share-button span { display: none; }
  .top-share-button { width: 36px; min-width: 36px; padding: 0 !important; }
  .admin-user > .baoku-theme-switcher { margin-left: 4px; }
  .baoku-theme-menu { right: 0; }
}
@media (max-width: 480px) {
  .top-actions .free-top-status { display: none; }
  .topbar .brand-lockup { gap: 7px; }
  .topbar .brand-mark { width: 34px; height: 34px; }
  .topbar .brand-lockup strong { font-size: 16px; }
  .topbar .brand-lockup span { font-size: 10px; }
}
