/* Shared palettes. UI accent shades use --theme-hue and --theme-saturation; Noir removes only UI tint.
   Item imagery, avatars, semantic status colors, and proof screenshots retain their colors. */
:root{--theme-saturation:1;--theme-hue:217;--bg:#090909;--theme-surface:#14171c;--theme-raised:#202832;--theme-header:#101216;--theme-border:#333b48;--theme-primary:#2468d4;--theme-primary-hover:#2b70db;--theme-accent:#86b6ff;--theme-on-primary:#fff;--online-dot:#27f58b;--online-halo:#27f58b55}
:root[data-theme=rose]{--theme-hue:330;--bg:#160c12;--theme-surface:#281820;--theme-raised:#3b2431;--theme-header:#1d1118;--theme-border:#604052;--theme-primary:#ae326f;--theme-primary-hover:#bd3b7b;--theme-accent:#f5a3ce}
:root[data-theme=midnight]{--theme-hue:225;--bg:#090e1d;--theme-surface:#121d35;--theme-raised:#1e2c4b;--theme-header:#0e172a;--theme-border:#314565;--theme-primary:#3d5fd1;--theme-primary-hover:#486bdd;--theme-accent:#a5baff}
:root[data-theme=violet]{--theme-hue:270;--bg:#110c19;--theme-surface:#21182f;--theme-raised:#322441;--theme-header:#191122;--theme-border:#514065;--theme-primary:#7040c4;--theme-primary-hover:#8050d4;--theme-accent:#c6a4ff}
:root[data-theme=ember]{--theme-hue:25;--bg:#18100c;--theme-surface:#2b1e17;--theme-raised:#402c21;--theme-header:#231711;--theme-border:#60402d;--theme-primary:#a74414;--theme-primary-hover:#bd511c;--theme-accent:#ffc18b}
:root[data-theme]{--panel:var(--theme-surface);--line:var(--theme-border);--blue:var(--theme-accent);--profile-bg:var(--theme-surface);--profile-inset:var(--theme-raised);--profile-border:var(--theme-border);--profile-accent:var(--theme-accent);--item-surface:var(--theme-surface);--item-border:var(--theme-border);--item-action:var(--theme-raised);--item-action-border:var(--theme-border);--item-blue:var(--theme-primary);--item-blue-border:var(--theme-primary-hover);color-scheme:dark}
html[data-theme] body{background:var(--bg)}
html[data-theme] .header-inner{background:var(--theme-header);border-color:var(--theme-border)}
html[data-theme] :is(.hero-demo-card,.float-card.catalog-card,.sell-inventory-card,.sell-public-card,.buy-order-card){background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme] :is(.categories,.filters,.account-panel,.auth-card,.auth-panel,.profile-summary,.profile-standing,.profile-content,.payment-overview,.payment-asset,.wallet-panel,.order-builder,.sell-composer,.sell-inventory,.benefit-panel,.trading-feature,.home-feature,.support-panel,.support-inbox,.proof-detail,.proof-sidebar,dialog){background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme] :is(.fee-calculator,.profile-earnings,.sort-options,.theme-popover,.profile-popover,.item-search-popover,.order-item-search [role=listbox],.support-card,.offer-window){background:var(--theme-raised);border-color:var(--theme-border)}
html[data-theme] .catalog-card :is(.float-image,.float-card-info){background:transparent}
html[data-theme] .catalog-card .card-action-tray{background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme] :is(.header-actions .header-icon,.header-actions .wallet-link,.filters .search,.filters .price-inputs label>div,.sort-trigger){background:var(--theme-raised);border-color:var(--theme-border)}
html[data-theme] :is(.button:not(.secondary):not(.bargain-button):not(.completed-trades-button),.support-launcher,.support-send,.hero-demo-buy:disabled,.offer-window-actions span:first-child){background:var(--theme-primary);border-color:var(--theme-primary-hover);color:var(--theme-on-primary)}
html[data-theme] :is(.button:not(.secondary):not(.bargain-button):not(.completed-trades-button),.support-launcher,.support-send):hover{background:var(--theme-primary-hover);color:var(--theme-on-primary)}
html[data-theme] .catalog-card .card-action-tray .buy-button{background:var(--theme-primary);border-color:var(--theme-primary-hover);color:var(--theme-on-primary)}
html[data-theme] .catalog-card .card-action-tray .buy-button:hover{background:var(--theme-primary-hover)}
html[data-theme] .hero-demo-actions button.hero-demo-buy:disabled{background:var(--theme-primary);border-color:var(--theme-primary-hover);color:var(--theme-on-primary)}
html[data-theme] :is(.button.secondary,.bargain-button,.cart-add,.completed-trades-button){border-color:var(--theme-border)}
html[data-theme] :is(.auction-clock time,.card-value dd,.fee-breakdown dd:not(.fee-net dd)){color:var(--theme-accent)}
html[data-theme] .fee-curve path:nth-child(2){stroke:var(--theme-accent)}
html[data-theme] .fee-curve circle:last-child{fill:var(--theme-accent)}
html[data-theme] .trait-filter input:checked{background:var(--theme-primary);border-color:var(--theme-accent)}
html[data-theme] .notification-switch[aria-checked=true]{background:var(--theme-primary)}
html[data-theme] :focus-visible{outline-color:var(--theme-accent)}
html[data-theme] .reset-all-filters:focus-visible{outline-color:#f5949d}
/* Presence stays unmistakably green in every palette. */
.seller-presence.is-online>i{background:var(--online-dot);box-shadow:0 0 0 3px #27f58b1c,0 0 8px var(--online-halo)}
.seller-presence.is-online>[data-presence-label]{color:#a2ffcc}
.theme-popover{width:280px;max-width:calc(100vw - 24px);padding:20px}
.theme-popover>div{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 14px}
.theme-option{display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0}
.theme-popover [data-theme-choice]{display:grid;place-items:center;position:relative;width:52px;height:52px;min-width:52px;padding:0;gap:0;border:2px solid transparent;border-radius:50%;background:transparent;color:#fff;box-shadow:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.theme-popover [data-theme-choice]:hover{transform:translateY(-2px);border-color:var(--theme-border)}
.theme-popover [data-theme-choice][aria-pressed=true]{border-color:var(--theme-accent);color:#fff;box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 15%,transparent)}
.theme-popover [data-theme-choice]:focus-visible{outline:2px solid var(--theme-accent);outline-offset:4px}
.theme-popover .theme-swatch{border-radius:50%;width:40px;height:40px;position:relative;overflow:hidden;border:1px solid #ffffff30;box-shadow:inset 0 1px 3px #ffffff0c}
.theme-swatch::after{content:'';position:absolute;inset:65% 0 0;height:auto;border-radius:0;background:var(--swatch-accent);opacity:.7}
.theme-popover [data-theme-choice]>.icon{right:auto;top:auto;left:50%;transform:translateX(-50%);width:18px;height:18px;filter:drop-shadow(0 1px 2px #000);z-index:1}
.theme-option-label{font-size:12px;line-height:1.2;color:var(--profile-muted)}
.theme-option:has([aria-pressed=true]) .theme-option-label{color:var(--theme-accent)}
.theme-popover .swatch-onyx{background:#090909;--swatch-accent:#2468d4}.theme-popover .swatch-rose{background:#281820;--swatch-accent:#f5a3ce}
.theme-popover .swatch-midnight{background:#121d35;--swatch-accent:#758eeb}.theme-popover .swatch-violet{background:#21182f;--swatch-accent:#c6a4ff}
.theme-popover .swatch-ember{background:#2b1e17;--swatch-accent:#ec955b}
@media(max-width:600px){.theme-popover{right:-45px;width:280px}}

/* Homepage collections share the active palette instead of neutral gray tabs. */
.home-market-toolbar .segmented{display:flex;gap:4px;padding:5px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface);box-shadow:inset 0 1px 0 #ffffff04}
.home-market-toolbar .segmented [data-home-tab]{position:relative;min-height:40px;padding:10px 15px;border:1px solid transparent;border-radius:8px;background:transparent;color:hsl(var(--theme-hue) calc(18% * var(--theme-saturation,1)) 74%);font-size:13px;line-height:18px;transition:background .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease}
.home-market-toolbar .segmented [data-home-tab]>.icon{color:currentColor;opacity:.75;flex-shrink:0}
.home-market-toolbar .segmented [data-home-tab]:hover{background:color-mix(in srgb,var(--theme-raised) 65%,transparent);color:#f1f5f9}
.home-market-toolbar .segmented [data-home-tab][aria-pressed=true]{background:var(--theme-raised);border-color:color-mix(in srgb,var(--theme-accent) 38%,var(--theme-border));color:var(--theme-accent);box-shadow:0 2px 5px #0002,inset 0 1px 0 #ffffff08}
.home-market-toolbar .segmented [data-home-tab][aria-pressed=true]>.icon{opacity:1}
.home-market-toolbar .segmented [data-home-tab]:focus-visible{outline:2px solid var(--theme-accent);outline-offset:2px}
@media(max-width:640px){.home-market-toolbar .segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:4px}.home-market-toolbar .segmented [data-home-tab]{padding:8px 5px;gap:5px;font-size:11px;min-height:40px}}
@media(prefers-reduced-motion:reduce){.theme-popover [data-theme-choice],.home-market-toolbar .segmented [data-home-tab]{transition:none}.theme-popover [data-theme-choice]:hover{transform:none}}

:root[data-theme=noir]{--theme-saturation:0;--control-ink:#eeeeee;--theme-muted:#a6a6a6;--theme-hue:217;--bg:#000000;--theme-surface:#131313;--theme-raised:#202020;--theme-header:#050505;--theme-border:#3b3b3b;--theme-primary:#ffffff;--theme-primary-hover:#e5e5e5;--theme-accent:#ffffff;--theme-on-primary:#090909;--text:#f4f4f4;--muted:#c4c4c4;--profile-text:#f4f4f4;--profile-muted:#c4c4c4}
.theme-popover .swatch-noir{background:#000;--swatch-accent:#fff}
.theme-popover{box-sizing:border-box;max-height:calc(100svh - 110px);overflow-y:auto;overscroll-behavior:contain}
