/* Generated colors are scoped to custom mode; presets keep their original art. */
.theme-selection-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
.theme-preview-custom { background: linear-gradient(135deg,#182438,#65517c,#e9c8c9); color: #fff; }
.theme-preview-custom::before { background: #ffffff30; }
.custom-theme-editor { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--panel-2); }
.custom-theme-editor[hidden] { display: none; }
.custom-theme-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.custom-theme-fields label { font-weight: 600; }
#customThemeColor { width: 48px; height: 40px; padding: 3px; cursor: pointer; }
#customThemeHex { width: 120px; min-width: 0; font-family: ui-monospace,monospace; }
.custom-theme-swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.custom-theme-swatches button { width: 30px; height: 30px; min-height: 0; padding: 0; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--swatch); }
.custom-theme-help { margin: 10px 0 0; color: var(--text-soft); font-size: 12px; }
.custom-theme-error { color: var(--danger-text); margin: 8px 0 0; font-size: 12px; }
.custom-theme-error:empty { display: none; }
@media(max-width:640px) {
  .theme-selection-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .theme-option { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 6px; }
  .theme-option-preview { height: 48px; }
  .theme-option-copy small { font-size: 11px; }
  .theme-option-badge { top: 8px; right: 8px; }
}
html[data-custom-theme] { scrollbar-color: var(--line-strong) var(--panel); }
html[data-custom-theme] :is(input,select,textarea) { border-color: var(--line-strong); }
html[data-custom-theme] :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
html[data-custom-theme] :is(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
html[data-custom-theme] .theme-option:focus-visible { outline: 3px solid var(--primary); }
html[data-custom-theme] :is(.primary,.guest-login,.hero-primary),
html[data-custom-theme] :is(.primary,.guest-login,.hero-primary):hover:not(:disabled),
html[data-custom-theme] .rank-refined #modelMarketplace .test-button,
html[data-custom-theme] .rank-refined #modelMarketplace .test-button:hover:not(:disabled),
html[data-custom-theme] #platformFilterButtons .platform-filter-button.is-active,
html[data-custom-theme] .rank-refined .table-head :is(.rank-model-shortcuts [data-rank-model],.catalog-presets button,.primary-filter-actions>button):is([aria-pressed=true],[aria-expanded=true]) {
  color: var(--button-ink); background: var(--primary); border-color: var(--primary); background-image: none;
}
html[data-custom-theme] .rank-refined .table-head .rank-model-chip>[aria-pressed=true]+.rank-model-remove { color: var(--button-ink); }
html[data-custom-theme] .rank-refined #modelMarketplace .route-slot-action { --rank-route-fill: var(--primary); --rank-route-ink: var(--button-ink); }
html[data-custom-theme] .rank-refined #modelMarketplace .route-slot-action.route-tone-route1 { --rank-route-fill: var(--warning); --rank-route-ink: var(--text); }
html[data-custom-theme] .rank-refined #modelMarketplace .route-slot-action.route-tone-route1.route-active { background: var(--panel-2); color: var(--warning-text); }
html[data-custom-theme] :is(.rank-overview-toggle,.ranking-site-actions .site-groups-filter-button,.account-effective-multiplier) { color: var(--text-soft); }
html[data-custom-theme] .rank-refined #summaryGrid .ai-recommendation-group,
html[data-custom-theme] .ai-chat-site-link, html[data-custom-theme] .rank-recommended-brand { color: var(--custom-blue); }
html[data-custom-theme] .rank-recommended:not(.rank-recommended-brand) { color: var(--warning-text); }
html[data-custom-theme] :is(.platform-openai,[data-platform=openai]) { --platform-rgb: var(--custom-openai-rgb); }
html[data-custom-theme] :is(.platform-anthropic,[data-platform=anthropic]) { --platform-rgb: var(--custom-anthropic-rgb); }
html[data-custom-theme] :is(.platform-gemini,[data-platform=gemini]) { --platform-rgb: var(--custom-gemini-rgb); }
html[data-custom-theme] :is(.platform-deepseek,[data-platform=deepseek]) { --platform-rgb: var(--custom-deepseek-rgb); }
html[data-custom-theme] :is(.platform-grok,[data-platform=grok]) { --platform-rgb: var(--custom-grok-rgb); }
html[data-custom-theme] :is(.platform-zhipu,[data-platform=zhipu]) { --platform-rgb: var(--custom-zhipu-rgb); }
html[data-custom-theme] :is(.platform-kimi,[data-platform=kimi]) { --platform-rgb: var(--custom-kimi-rgb); }
html[data-custom-theme] :is(.platform-minimax,[data-platform=minimax]) { --platform-rgb: var(--custom-minimax-rgb); --platform-fill: var(--panel-2); }
html[data-custom-theme] :is(.ai-recommendation-tab,.platform-filter-button)[data-platform=deepseek] { --tab-color: rgb(var(--custom-deepseek-rgb)); }
html[data-custom-theme] .rank-refined #home .hero-provider.platform-deepseek { color: rgb(var(--custom-deepseek-rgb)); }
html[data-custom-theme] :is(.auth-story,.discovery-hero) { background: var(--panel-2); color: var(--text); }
html[data-custom-theme] .discovery-hero::before,
html[data-custom-theme] .discovery-hero::after { display: none; }
html[data-custom-theme] :is(.auth-home,.auth-benefits strong,.hero-preview-title>span,.hero-channel-copy strong,.hero-stats strong) { color: var(--text); }
html[data-custom-theme] :is(.auth-story-copy p,.auth-benefits small,.auth-story-foot,.auth-story-copy .section-kicker,.auth-benefits>span,.hero-eyebrow,.hero-copy>p,.hero-assurance,.hero-preview-head>span:first-child,.hero-preview-badge,.hero-preview-title small,.hero-channel-copy small,.hero-channel-price small,.hero-preview-foot,.hero-preview-empty,.hero-stats span,.hero-data-note,.hero-data-note small) { color: var(--text-soft); }
html[data-custom-theme] :is(.auth-story h2,.hero-copy h2 span) { color: var(--text); background: none; -webkit-text-fill-color: currentColor; }
html[data-custom-theme] :is(.hero-preview,.hero-channel,.hero-secondary) { background: var(--panel); border-color: var(--line-strong); color: var(--text); }
html[data-custom-theme] :is(.hero-channel:hover,.hero-secondary:hover) { background: var(--panel-2); color: var(--text); }
html[data-custom-theme] :is(.hero-channel-price strong,.hero-preview-foot a) { color: var(--primary); }
html[data-custom-theme] .modal { background: rgba(0,0,0,.45); }
html[data-custom-theme] #themeSelectionModal { background: rgba(0,0,0,.18); }
html[data-custom-theme] .theme-toggle { color: var(--text); background: var(--panel-2); border-color: var(--line-strong); }
html[data-custom-theme] #siteForm .site-mode-button { --mode-button-bg: var(--primary); color: var(--button-ink); }
html[data-custom-theme] #siteForm .site-mode-button:hover:not(:disabled) { background: var(--primary); }
html[data-custom-theme] .rank-refined #modelMarketplace .group-model-summary { background: var(--panel-2); color: var(--text-soft); border-color: var(--line-strong); }
html[data-custom-theme] .desktop-app-links a.primary { color: var(--button-ink); }
