:root[data-inudex-theme] header.terminal-header {
  position: relative; z-index: 22; height: auto; min-height: 3.25rem;
  flex-wrap: wrap; gap: .5rem 1.25rem; padding: .2rem clamp(.7rem, 2vw, 2rem);
}
:root[data-inudex-theme] header.terminal-header .header-trade {
  margin-inline-start: auto; width: auto; padding-inline: .75rem!important;
}
:root[data-inudex-theme] header.terminal-header .theme-picker { margin: 0; }
.desk-tools {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .15rem 1.25rem; padding: .22rem clamp(.7rem, 2vw, 2rem);
  border-bottom: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.desk-tools .dex-tabs,.desk-actions,.desk-community {
  position: static; display: flex; align-items: center; flex-wrap: wrap;
  gap: .3rem; margin: 0; padding: 0; border: 0; background: transparent;
}
.desk-community { margin-inline-start: auto; gap: .75rem; }
.desk-tools :is(a,button) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.4rem;
  border: 1px solid transparent; border-radius: .35rem; color: inherit;
  font: 650 .875rem/1.2 var(--inu-type,system-ui); text-decoration: none;
  background: transparent; white-space: nowrap; cursor: pointer; padding: .3rem .55rem;
}
.desk-tools :is(.desk-actions button,.dex-tabs [aria-selected=true]) {
  color: var(--text); border-color: var(--coin-edge,var(--line)); background: var(--toolbar-face,var(--panel));
}
.desk-tools :is(a,button):focus-visible,
.desk-tools :is(a,button):hover { outline: 2px solid var(--orange,currentColor); outline-offset: -2px; }
body.chart-focused .desk-tools,body.chart-focused #pack-activity {display:none}
@media(max-width:760px) {
  .desk-tools {gap:.15rem .5rem}
  .desk-tools :is(a,button) {min-height:2.65rem}
  .desk-community {margin-inline-start:0}
}
@media(max-width:520px) {
  :root[data-inudex-theme] header.terminal-header {gap:.12rem .7rem}
  :root[data-inudex-theme] header.terminal-header nav.inu-network-compact {order:3;flex:1 1 auto}
  :root[data-inudex-theme] header.terminal-header .theme-picker {order:4;margin-left:auto}
  .desk-tools {display:block}
  .desk-tools > div {display:inline-flex;vertical-align:middle}
  .desk-community {width:100%}
}

/* Keep the page scrollable over cross-origin charts until touch interaction is requested. */
#chart-gestures[hidden] { display: none }
#market-chart.chart-scroll-through { pointer-events: none }
#chart-gestures {
  position: absolute; top: .35rem; right: .5rem; z-index: 3;
  min-height: 42px; padding: .45rem .85rem; border-radius: .45rem;
  border: 1px solid var(--inu-edge); background: var(--inu-panel); color: var(--inu-ink);
  font: 650 .85rem/1.2 system-ui,sans-serif; cursor: pointer;
}
#chart-gestures[aria-pressed=true] { border-color: var(--inu-accent); }
#chart-gestures:focus-visible { outline: 3px solid var(--inu-accent); outline-offset: 2px; }
@media (max-width:820px), (any-pointer:coarse) {
  #market .chart-stage:has(#chart-gestures:not([hidden])) {
    box-sizing: border-box; padding-top: 50px; background: var(--inu-panel);
  }
  #market .chart-stage:has(#chart-gestures:not([hidden])) #market-chart {
    position: absolute; inset: 50px 0 0; width: 100%; height: calc(100% - 50px);
  }
}
:root[data-inudex-theme=timber] body #market { padding-inline: clamp(.65rem,2vw,1.5rem); }
:root[data-inudex-theme=timber] body #market :is(.market-overview,.panel-heading,.records-disclosure > summary) { padding-inline: clamp(.65rem,1.3vw,1rem); }
:root[data-inudex-theme=white] body #market .chart-toolbar :is(.chart-action,.address,.subtle-link,select,.outbound-icon) {
  background: #fff; color: #182638; border-color: #8592a3; text-shadow: none;
}
:root[data-inudex-theme=white] body #market .chart-toolbar :is(button[aria-pressed=true],button:hover,a:hover) {
  background: #e0eaf4; color:#142943; border-color:#416483;
}
:root[data-inudex-theme=white] body :is(.desk-tools,#market) :is(.muted,.data-note,.micro-note,.section-label,.freshness-line) {
  color: #43536a;
}
:root[data-inudex-theme=white] body #market .chart-toolbar :focus-visible { outline: 3px solid #225986; outline-offset: 1px; }

/* Keep the colored rims and selected state. Continuous light behind small type
   and repeating shimmer make it harder to follow numbers as the board refreshes. */
:root[data-inudex-theme=neon] body #market :is(.panel,.markets-board,.coin-browser,.records-disclosure) {
  box-shadow:none; border-color:color-mix(in srgb,var(--neon-accent,#a58cce) 62%,#171421);
}
:root[data-inudex-theme=neon] body #market :is(h1,h2,h3,p,a,button,label,summary,span,strong,small,dt,dd,th,td,code) {
  text-shadow:none;
}
:root[data-inudex-theme=neon] body #market .coin-browser .coin-chip.launchpad-coin,
:root[data-inudex-theme=neon] body #market .coin-browser .coin-chip.launchpad-coin::after {animation:none;}
:root[data-inudex-theme=neon] body #market .coin-browser .coin-chip.launchpad-coin::after {display:none;}
:root[data-inudex-theme=neon] body #market .ticker-track .coin-chip {
  box-shadow:inset 0 1px color-mix(in srgb,var(--chip-rim) 35%,transparent);
}
:root[data-inudex-theme=neon] body #market .ticker-track .coin-chip:is(:focus-visible,[aria-pressed=true]) {
  outline:2px solid var(--chip-rim); outline-offset:1px;
}
:root[data-inudex-theme=neon] body #market .chart-stage iframe {filter:none;}
@media(prefers-reduced-motion:no-preference) {
  :root[data-inudex-theme=neon] body #market .ticker-track {animation-duration:100s;}
}
