/* Shared Noir palette, derived from Rewards / Referrals.
   Colors only: no layout, gesture, chart geometry, wallet or execution changes. */
body.theor-modern{
 --bg:#07090a;--panel:#0d1011;--raised:#171e1b;--border:#2a312d;
 --text:#edf3ef;--muted:#a0afa6;--dim:#83948a;
 --phone-bg:var(--bg);--phone-surface:var(--panel);--phone-line:var(--border);--phone-muted:var(--muted);
 --modern-surface:linear-gradient(140deg,#101414,#0a0d0e);
 --modern-raised:linear-gradient(135deg,#1c2921,#121b17);
 --modern-sticky:#080a0bf7;--modern-line:#2a312d;--modern-line-bright:#3c4b40;
 --modern-shadow:inset 0 1px #ffffff04,0 8px 24px #00000024;
 --modern-glow:0 0 15px #91ef9a08;
 --lumen-card:var(--modern-surface);--lumen-edge:linear-gradient(120deg,#3a453b,#242d28 70%,#344238);
 --noir-bg:#07090a;--noir-panel:#0d1011;--noir-inset:#090c0d;
 --noir-sticky:#080a0bf7;--noir-border:#2a312d;--noir-active:#18391f;
 background:var(--noir-bg);color:var(--text);color-scheme:dark;
 scrollbar-color:#3c4b40 var(--noir-bg);
}
body.theor-modern:has(#view.sol-release-view[data-mobile-layout]),
body.theor-modern.preview-access-locked{background:var(--noir-bg)!important}
body.theor-modern #view.sol-release-view,
body.theor-modern #view.sol-release-view:not(:has(.flow-home)),
body.theor-modern:has(#view[data-mobile-layout=focus]) #view.sol-release-view,
body.theor-modern:has(#view[data-mobile-layout=focus] .flow-home) #view.sol-release-view,
body.theor-modern #view.sol-release-view[data-mobile-layout=classic]:has(.terminal-layout){background:var(--noir-bg)!important}
body.theor-modern:has(#view.sol-release-view) #app>.topbar,
body.theor-modern:has(#view.sol-release-view[data-mobile-layout=focus]) #app>.topbar{background:var(--noir-sticky)!important;border-bottom-color:#252c27!important;box-shadow:none!important}
body.theor-modern:has(#view.sol-release-view) #app>.rail{background:linear-gradient(180deg,#0b0f0d,#080a0b);border-right-color:var(--noir-border)}
body.theor-modern .sol-release-view~.footer{background:#0b0f0d;border-color:var(--noir-border)}
body.theor-modern :is(.workspace-view-switch,.workspace-view-options,.sol-release-chain>div,.sol-release-chain summary,.phone-top-controls>button){background:var(--modern-surface);border-color:var(--modern-line-bright);box-shadow:inset 0 1px #ffffff06}
body.theor-modern:has(#view.sol-release-view) .sol-release-nav{background:#0c1110f5!important;border-color:#303c31!important;box-shadow:0 8px 22px #0005!important}
body.theor-modern:has(#view.sol-release-view) .sol-release-nav>button.active{background:var(--noir-active)!important;border-color:#79af6950!important;box-shadow:inset 0 1px #c6ffb20b!important}
body.theor-modern:has(#view.sol-release-view) .rail .nav-button.active{background:var(--noir-active);box-shadow:inset 2px 0 #b6ff82;border-color:#79af6940}
body.theor-modern:has(#view[data-mobile-layout=focus]) .credits-rail.credits-rail--signal{background:#0c1110!important;border-color:#252f28!important}
body.theor-modern:has(#view[data-mobile-layout=focus]) .topbar .theor-product-switch{background:#0c1110f7!important;border-color:#2d3b30;box-shadow:none}

/* Shared cards also cover empty, loading, signed-out and read-only states. */
body.theor-modern :is(.panel,.embedded-panel,.stat-card,.embedded-wallet-card,.bx-board-column,.bx-market-table,.discover-table,.discover-flow-bridge,.profile-cash,.sol-ref-code,.ref-active-tier,.ref-tier-card,.sol-ref-unavailable,.trader-own-rank,.trader-add,.trader-signin,.sol-payout-balance,.sol-readiness-list article,.portfolio-summary,.portfolio-position,.track-token-card,.track-history-row,.track-sources,.caller-card,.launchpad-panel,.launchpad-rewards-panel,.launchpad-benefits,.launchpad-reward-choice,.launchpad-token-card,.launch-protection-panel,.holder-overview,.holder-status-board){background:var(--modern-surface)!important;border-color:var(--noir-border)!important;box-shadow:var(--modern-shadow)}
body.theor-modern :is(.panel-title,.panel-header,.bx-table-heading,.discover-labels,.bx-board-column>header,.sol-feed-recap>header){background:#111813;border-color:var(--noir-border)}
body.theor-modern :is(.external-wallet-panel,.identity-wallet-panel,.identity-profile-summary,.launchpad-wallet-bar,.optional-embedded-wallet,.portfolio-connect,.portfolio-call-summary,.portfolio-order-card,.portfolio-detail,.boost-board,.boost-paid-notice,.tools-copy-draft){background:var(--modern-surface)!important;border-color:var(--noir-border)!important;box-shadow:var(--modern-shadow)}
body.theor-modern :is(.bx-board-column>p,.bx-chart-source,.chart-activity-summary,.holder-history-note){background:#0c1110;border-color:var(--noir-border)}
body.theor-modern :is(.sol-order-history-row,.sol-receipt-row,.sol-holding-row,.trader-row,.track-event,.discover-row,.bx-token,.phone-token-list article){border-color:#29342b80}
body.theor-modern :is(.profile-cover,.sol-feed-recap,.sol-feed-profit,.trader-row.is-you){background:linear-gradient(140deg,#17271c,#0c1310)!important;border-color:#354a37;box-shadow:inset 0 1px #c5ffc70a}
body.theor-modern :is(.page-heading h1,.profile-hero h1,.focus-token-headline>div>strong){text-shadow:none}

/* Neutral controls stay neutral; primary Buy / Sell and warning colors are retained. */
body.theor-modern :is(input:not([type=radio]):not([type=checkbox]):not([type=range]),select,textarea){background:#0a100d;border-color:#394a3d;box-shadow:inset 0 1px 3px #0003}
body.theor-modern :is(.focus-search-box,.discover-search,.discover-advanced,.sol-release-search,.phone-search-dock){background:var(--modern-surface)!important;border-color:#394a3d;box-shadow:inset 0 1px #ffffff05,0 8px 24px #0003}
body.theor-modern :is(.profile-periods,.trader-periods,.profile-position-heading>div,.sol-holder-sources,.track-subtabs,.launchpad-tabs){background:#0d1410;border-color:var(--noir-border);box-shadow:none}
body.theor-modern :is(.profile-periods,.trader-periods,.profile-position-heading>div,.sol-holder-sources,.track-subtabs,.launchpad-tabs,.discover-controls,.bx-market-controls,.sol-discovery-tabs) [aria-pressed=true]{background:var(--noir-active)!important;border-color:#5b844f80;color:#dcf3d8;box-shadow:inset 0 1px #c8ffbd0b}
body.theor-modern #view[data-mobile-layout=focus] .flow-home .phone-market-filters .phone-segment button:not([aria-pressed=true]),
body.theor-modern #view[data-mobile-layout=focus] .flow-home .phone-market-filters>button,
body.theor-modern #view[data-mobile-layout=focus] .phone-search-categories>.phone-segment,
body.theor-modern #view[data-mobile-layout=focus] .discover-launchpad-control>button{background:#111a14!important;border-color:#354536;box-shadow:none}
body.theor-modern #view[data-mobile-layout=focus] .flow-home .phone-market-filters .phone-segment [aria-pressed=true],
body.theor-modern #view[data-mobile-layout=focus] .phone-search-categories [aria-pressed=true]{background:var(--noir-active)!important;border-color:#5b844f80;box-shadow:none}
body.theor-modern #view[data-mobile-layout=focus] .flow-home .phone-balance{background:none;box-shadow:none}
body.theor-modern #view[data-mobile-layout=focus] .flow-home .phone-balance strong{text-shadow:none}
body.theor-modern :is(.sol-feed-tabs,.trader-tabs,.sol-track .track-tabs,.sol-traders .tools-tabs,.portfolio-tabs,.portfolio-filters,.flow-home-tabs){background:var(--noir-sticky)!important;border-color:var(--noir-border);box-shadow:none}
body.theor-modern .sol-track .track-toolbar>button,
body.theor-modern .sol-track .track-empty-actions button{background:#17251b;border-color:#3b503b;box-shadow:none}
body.theor-modern :is(.phone-chart-more-menu,.terminal-chart-settings-panel,.sol-trade-settings,.sol-balance-details,.terminal-route-settings>strong){background:var(--modern-surface)!important;border-color:#37483b;box-shadow:inset 0 1px #ffffff05}

/* Token screens and sticky holder cells keep their existing geometry and data colors. */
body.theor-modern #view.sol-release-view :is(.chart-and-tables,.chart-and-trade,.chart-host,#solana-chart,.chart-wrap,.terminal-data,.chart-activity,.holder-ledger-wrap){background:var(--noir-inset)!important;border-color:var(--noir-border)}
body.theor-modern #view.sol-release-view :is(.chart-toolbar,.focus-candle-toolbar,.terminal-token-header,.terminal-chart-topline,.terminal-trades-table th){background:#101713!important;border-color:var(--noir-border)!important}
body.theor-modern #view.sol-release-view[data-mobile-layout=classic]{--border:#2a312d;--muted:#9aa99f}
body.theor-modern #view.sol-release-view[data-mobile-layout=classic] .trade-sidebar .panel,
body.theor-modern #view.sol-release-view[data-mobile-layout=classic] #sol-swap-form .sol-trade-settings,
body.theor-modern #view.sol-release-view[data-mobile-layout=classic] .sol-balance-details{background:var(--noir-panel)!important;border-color:var(--noir-border)!important}
body.theor-modern #view.sol-release-view[data-mobile-layout=classic] #sol-swap-form .terminal-fee-grid input,
body.theor-modern #view.sol-release-view[data-mobile-layout=classic] #sol-swap-form .sol-settings-body select,
body.theor-modern #view.sol-release-view #sol-swap-form .sol-amount-field>input{background:#0a100d!important;border-color:#394a3d!important}
body.theor-modern #view.sol-release-view #sol-swap-form .buy-sell{background:#111913!important;border-color:#303e33!important}
body.theor-modern #view.sol-release-view :is(.bx-chart-source,.chart-activity-summary,.sol-trade-risk){background:#0d1310!important;border-color:var(--noir-border)}
body.theor-modern #view.sol-release-view[data-mobile-layout=classic] .terminal-token-actions :is(button,a){background:#18221b;border-color:#35483a}
body.theor-modern #view.sol-release-view #sol-swap-form .preset-grid button{background:#18251c!important;border-color:#3a503d!important;box-shadow:none}
body.theor-modern #view.sol-release-view #sol-swap-form .preset-grid button[aria-pressed=true]{background:var(--noir-active)!important;border-color:#81bd6380!important}
body.theor-modern #view.sol-release-view[data-mobile-layout=focus] .focus-token-dock{background:linear-gradient(0deg,#0b100dfc 65%,#0b100df5)!important;border-top-color:#2b3a2e;box-shadow:0 -8px 24px #0004}
body.theor-modern #view.sol-release-view[data-mobile-layout=focus].focus-trade-open .trade-sidebar{background:var(--noir-panel)!important;border-color:#394b3c;box-shadow:inset 0 1px #ffffff07,0 -20px 0 100vh #0009}
body.theor-modern .holder-board{--holder-bg:#090c0d;--holder-line:#29352d}
body.theor-modern :is(.holder-ledger thead th,.holder-ledger .holder-wallet-cell){background:#101713!important;border-color:var(--noir-border)}
body.theor-modern .holder-board .holder-ledger tbody tr:hover>.holder-wallet-cell{background:#17241b!important}
body.theor-modern :is(.launchpad-tabs,.launchpad-page){--lp-line:#2a352d}
body.theor-modern .launchpad-hero{background:radial-gradient(ellipse at 90% 35%,#367c4010,transparent 65%);border-color:#2c372f}
body.theor-modern .launchpad-token-card:hover{border-color:#6d9c6380!important}

/* Opaque dark menus and dialogs, without moving or hiding any controls. */
body.theor-modern :is(dialog,.modal,.sol-phone-dialog,.sol-feed-dialog,.launchpad-dialog,.trader-details,.chart-interval-dialog,.chart-activity-dialog,.phone-chart-more-menu,.track-dialog,.preview-account-dialog,.credit-confirm){background:linear-gradient(145deg,#141c17,#0c1210 80%)!important;border-color:#3a4c3b!important;box-shadow:inset 0 1px #ffffff08,0 22px 75px #000b}
body.theor-modern dialog::backdrop{background:#020504ba}
body.theor-modern .preview-access-shell{background:var(--noir-bg)}
body.theor-modern :is(.preview-access-header,.credits-page--signal .signal-section-nav){background:var(--noir-sticky)}

@media(prefers-reduced-transparency:reduce){
 body.theor-modern :is(.topbar,.sol-release-nav,.phone-search-dock,.workspace-view-options,dialog){background-color:#0d1210!important;backdrop-filter:none!important}
}
@media(forced-colors:active){
 body.theor-modern{background:Canvas!important;color:CanvasText!important}
 body.theor-modern #view.sol-release-view,
 body.theor-modern :is(.topbar,.rail,.sol-release-nav,.panel,.chart-host,.holder-wallet-cell,.launchpad-panel,.track-token-card,.ref-tier-card,dialog,.modal){background:Canvas!important;color:CanvasText!important;border-color:CanvasText!important;box-shadow:none!important}
 body.theor-modern :is(button,a,summary,input,select,textarea):focus-visible{outline-color:Highlight}
}
