/* Theme navigation belongs in the unused desktop gutters or the compact footer. */
.theme-edge { display:none; }
.theme-navigation { grid-column:2/-1;justify-self:end;display:flex;align-items:center;gap:8px;color:var(--paper); }
body>footer .footer-inner>small { grid-column:1;grid-row:2;align-self:center; }
body>footer .theme-navigation { grid-row:2; }
.theme-navigation button,.theme-edge { width:40px;height:40px;padding:10px;border:1px solid var(--line-strong);border-radius:50%;background:var(--panel);color:var(--secondary-text);cursor:pointer;transition:background-color .18s,border-color .18s,color .18s; }
.theme-navigation button:hover,.theme-edge:hover { color:var(--on-accent);background:var(--acid);border-color:var(--acid); }
.theme-navigation button:focus-visible,.theme-edge:focus-visible { outline:2px solid var(--acid);outline-offset:4px; }
.theme-navigation svg,.theme-edge svg { display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8; }
[data-theme-step="-1"] svg { transform:rotate(180deg); }
.theme-swipe { display:flex;align-items:center;justify-content:center;gap:9px;min-width:128px;min-height:40px;padding:4px 6px;font:12px var(--sans);touch-action:pan-y pinch-zoom;user-select:none; }
.theme-swatches { display:flex;gap:3px; }
.theme-swatches i { width:9px;height:16px;border-radius:4px;background:var(--acid); }
.theme-swatches i:nth-child(2) { background:var(--secondary); }
.theme-swatches i:nth-child(3) { background:var(--panel-3);border:1px solid var(--line-strong); }
.theme-swipe small { display:none; }
.theme-sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
@media(min-width:1700px) {
  .theme-edge { position:absolute;display:grid;place-items:center;top:22px;z-index:25;width:44px;height:44px; }
  .theme-edge-previous { left:28px; }.theme-edge-next { right:28px; }
  .theme-navigation { display:none; }
}
@media(max-width:800px) {
  body>footer .footer-inner>small { grid-row:3; }
  body>footer .theme-navigation { grid-column:2;grid-row:3; }
}
@media(max-width:560px) {
  body>footer .theme-navigation { grid-column:1/-1;grid-row:auto;justify-self:stretch;justify-content:center;padding-top:10px;border-top:1px solid var(--line); }
  .theme-navigation button { width:44px;height:44px; }
  .theme-swipe { flex-wrap:wrap;column-gap:9px;row-gap:3px;width:160px;padding-block:6px; }
  .theme-swipe small { display:block;flex-basis:100%;text-align:center;font:10px var(--sans);color:var(--muted); }
}
/* Every UI surface uses semantic colors; artwork itself is never filtered. */
html[data-ui-theme] { accent-color:var(--acid); }
html[data-ui-theme] ::selection { background:var(--acid);color:var(--on-accent); }
html[data-ui-theme] body>footer { background:var(--panel-2);border-color:var(--line); }
/* A single neutral surface ladder across the whole app. The only decorative
   chromatic role is the primary accent. Arc keeps its original appearance. */
html[data-ui-theme]:not([data-ui-theme="arc"]) {
  --warm-line:var(--theme-line-strong);
  --warm-hover:var(--theme-panel-3);
  --secondary-glow:color-mix(in srgb,var(--paper) 3%,transparent);
  --secondary-selection:color-mix(in srgb,var(--acid) 10%,var(--panel-2));
}
html[data-ui-theme]:not([data-ui-theme="arc"]) :is(body,#view-studio,#view-marketplace) {
  background-image:var(--finish-grain);
  background-size:128px 128px;
  background-repeat:repeat;
}
html[data-ui-theme]:not([data-ui-theme="arc"]) :is(.arc-top-section,.minted-section) {
  background:var(--panel);
  border-color:var(--line-strong);
}
html[data-ui-theme]:not([data-ui-theme="arc"]) body>footer { background:var(--panel); }
html[data-ui-theme]:not([data-ui-theme="arc"]) :is(.arc-discovery-search,.arc-filter-control,.arc-filter-control select) { background:var(--panel-2); }
html[data-ui-theme]:not([data-ui-theme="arc"]) :is(.site-header .nav-link.active,.arc-filter-chips button.active) { background:var(--primary-selection);color:var(--paper); }
/* Studio used to inherit the old clay menu and canvas gradients independently.
   Resolve those components explicitly, including dialogs outside the workspace. */
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio[data-studio-layout] .sf-experience {
  --panel:var(--theme-panel);--panel-2:var(--theme-panel-2);--panel-3:var(--theme-panel-3);
  --ink:var(--theme-ink);--paper:var(--theme-paper);--muted:var(--theme-muted);--muted-2:var(--theme-muted-2);
  --line:var(--theme-line);--line-strong:var(--theme-line-strong);
  --warm-hover:var(--theme-panel-3);
}
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.preview-bar,.active-model,.preview-bar button) { background:var(--panel);border-color:var(--line);color:var(--muted); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio .preview-empty { background:var(--ink); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio .preview-empty::before { background-image:none;opacity:0; }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio .preview-empty svg { color:var(--muted); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.advanced-row,.sprite-trait-option,.sprite-trait-option.enabled,.quote-trigger,.model-option,.style-trigger,.plain-input,.suffix-input,.chat-compose,.launch-economics) { background:var(--panel-2);border-color:var(--line-strong); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio #spriteTraitOption { border-color:var(--line-strong); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.chat-compose:focus-within,.plain-input:focus-visible,.suffix-input:focus-within) { border-color:var(--acid); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.advanced-row>svg,.sprite-frequency output,.active-model) { color:var(--muted); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.advanced-row:hover,.model-option:hover,.style-trigger:hover) { background:var(--panel-3);border-color:var(--line-strong); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.model-option.active,.advanced-row.has-palette) { background:var(--primary-selection);border-color:var(--acid); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio :is(.generate-button:disabled,.chat-compose button:disabled) { background:var(--panel-3);color:var(--muted);border:1px solid var(--line-strong);opacity:1;box-shadow:none; }
html[data-ui-theme]:not([data-ui-theme="arc"]) #view-studio .sprite-frequency input { accent-color:var(--acid); }
html[data-ui-theme]:not([data-ui-theme="arc"]) :is(#directionDialog,#view-studio .style-menu,#view-studio .quote-menu) { background:var(--panel);border-color:var(--line-strong); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #directionDialog .palette-slot { background:var(--panel-2);border-color:var(--line-strong); }
html[data-ui-theme]:not([data-ui-theme="arc"]) #directionDialog .palette-slot.active { background:var(--primary-selection);border-color:var(--acid);box-shadow:inset 3px 0 var(--acid); }
html[data-ui-theme]:not([data-ui-theme="arc"]) .market-network-tabs button[aria-pressed="true"] { background:var(--primary-selection);border-color:var(--acid);color:var(--paper); }
html[data-ui-theme]:not([data-ui-theme="arc"]) .toast { border-color:var(--line-strong);box-shadow:0 12px 32px var(--finish-shadow-deep); }
html[data-ui-theme] .machine-metrics:hover,html[data-ui-theme] .machine-metrics:focus-visible { background:color-mix(in srgb,var(--paper) 6%,transparent);border-color:var(--line-strong); }
html[data-ui-theme] .creator-avatar { background:linear-gradient(135deg,var(--primary-selection),var(--panel-3));color:var(--secondary-text); }
html[data-ui-theme] .creator-popover { border-color:var(--line-strong);box-shadow:0 18px 60px var(--finish-shadow-deep); }
html[data-ui-theme] .arc-card-counts.is-minted-out { color:var(--green); }
html[data-ui-theme] .creator-return-negative,html[data-ui-theme] [data-social-status] { color:var(--danger); }
html[data-ui-theme] .social-wallet-network[data-state="warning"],html[data-ui-theme] #connectWallet[data-wallet-state="wrong-network"],html[data-ui-theme] #walletDialog .wallet-account-card>b[data-state="warning"],html[data-ui-theme] #walletDialog .wallet-options button.unsupported b { color:var(--warning);border-color:var(--warning); }
html[data-ui-theme] .social-wallet-network[data-state="warning"] i { background:var(--warning); }
html[data-ui-theme] #walletDialog .wallet-message[data-tone="error"] { color:var(--danger)!important; }
html[data-ui-theme] #walletDialog .wallet-disconnect:hover { color:var(--danger);border-color:var(--danger);background:var(--panel-3); }
html[data-ui-theme] #view-studio .quote-option.active { background:var(--primary-selection); }
html[data-ui-theme] .arc-mint-target-warning { border-color:color-mix(in srgb,var(--warning) 35%,transparent);background:color-mix(in srgb,var(--warning) 6%,var(--panel)); }
html[data-ui-theme] .arc-mint-target-warning strong { color:var(--warning); }
html[data-ui-theme] .arc-launch-estimate .arc-mint-target-warning p { color:var(--muted); }
html[data-ui-theme] #studioCurrencyDialog { background-color:var(--panel);border-color:var(--line-strong);color:var(--paper); }
html[data-ui-theme] .studio-currency-dialog-content { background:linear-gradient(transparent 75px,color-mix(in srgb,var(--panel) 94%,transparent) 170px,var(--panel) 290px); }
html[data-ui-theme] .studio-currency-dialog h2 { color:var(--paper); }
html[data-ui-theme] .studio-currency-dialog p,html[data-ui-theme] .studio-currency-dialog #studioCurrencyDetails { color:var(--muted); }
html[data-ui-theme] .studio-currency-network { color:var(--secondary-text); }
html[data-ui-theme] .studio-currency-dialog #studioCurrencyError { color:var(--danger); }
html[data-ui-theme] #marketBuyQuick[aria-checked="true"]>span { background:var(--on-accent); }
html[data-ui-theme] .arc-split-bar span:nth-child(2) { background:var(--secondary);color:var(--on-accent); }
html[data-ui-theme] .arc-split-bar span:nth-child(3) { background:var(--panel-3);color:var(--paper); }
html[data-ui-theme] .arc-split-legend article:nth-child(2) i { background:var(--secondary); }
html[data-ui-theme] .arc-split-legend article:nth-child(3) i { background:var(--muted); }
.arc-hero-shader:not([data-renderer="webgl"]) { background:radial-gradient(ellipse at 80% 35%,var(--hero-surface),var(--hero-base) 75%); }
html[data-ui-theme] .motion-switch-thumb { background:linear-gradient(130deg,var(--motion-base),var(--motion-surface));border-color:var(--line-strong);box-shadow:inset 0 1px 0 var(--finish-glint); }
html[data-ui-theme] .motion-switch-thumb::after { background:transparent;box-shadow:inset 0 0 0 1px var(--line); }
html[data-ui-theme] .motion-switch[aria-checked="false"] .motion-option-static,html[data-ui-theme] .motion-switch[aria-checked="true"] .motion-option-dynamic { color:var(--paper);text-shadow:none; }
html[data-ui-theme="linen"] .motion-switch[aria-checked="false"] .motion-option-static { color:var(--on-art);text-shadow:0 1px 3px #090909; }
html[data-ui-theme] .motion-switch[aria-checked="true"] .motion-switch-thumb {
  border-color:color-mix(in srgb,var(--acid) 65%,#fff);
  background:radial-gradient(ellipse at 85% 0%,color-mix(in srgb,var(--motion-glow) 65%,transparent),transparent 60%),radial-gradient(ellipse at 10% 100%,color-mix(in srgb,var(--acid) 45%,transparent),transparent 65%),color-mix(in srgb,var(--motion-base) 70%,#090909);
  box-shadow:inset 0 0 14px color-mix(in srgb,var(--motion-glow) 20%,transparent),0 0 20px color-mix(in srgb,var(--motion-glow) 28%,transparent);
}
html[data-ui-theme] .motion-switch[aria-checked="true"] .motion-option-dynamic { color:var(--on-art);text-shadow:0 1px 3px #090909,0 0 7px #090909; }
html[data-ui-theme] #view-studio .motion-switch[aria-checked="true"] { box-shadow:0 0 18px color-mix(in srgb,var(--motion-glow) 15%,transparent); }
@media(forced-colors:active) {
  html[data-ui-theme] #view-studio .motion-switch[aria-checked="true"] { box-shadow:none; }
  html[data-ui-theme] .motion-switch[aria-checked="true"] .motion-switch-thumb { background:Highlight;border-color:Highlight;box-shadow:none; }
  html[data-ui-theme] .motion-switch[aria-checked="true"] .motion-option-dynamic,html[data-ui-theme="linen"] .motion-switch[aria-checked="false"] .motion-option-static { color:HighlightText;text-shadow:none; }
}
/* Fixed semantic mint/bonded badges stay blue/green; their own text/background
   pairs remain unchanged. On-art badges also retain their dark backing. */
html[data-theme-mode="light"] .msc-chain-nav [data-ml-chain="robinhood"],html[data-theme-mode="light"] .msc-chain-group[data-market-chain-group="robinhood"] { --network-accent:#43642e; }
html[data-theme-mode="light"] .msc-chain-nav [data-ml-chain="ethereum"],html[data-theme-mode="light"] .msc-chain-group[data-market-chain-group="ethereum"] { --network-accent:#365ab0; }
html[data-theme-mode="light"] .msc-chain-nav [data-ml-chain="solana"],html[data-theme-mode="light"] .msc-chain-group[data-market-chain-group="solana"] { --network-accent:#704296; }
@media(prefers-reduced-motion:reduce) { .theme-navigation button,.theme-edge { transition:none; } }
@media(forced-colors:active) { .theme-navigation button,.theme-edge { border-color:ButtonText;color:ButtonText;background:ButtonFace; }.theme-swatches { display:none; } }
