/* Consistent workspace and chart-local tools; original logo remains untouched. */
body #btn-broker[hidden], body #btn-autofollow[hidden], body #btn-reset-view[hidden] { display: none !important; }
body .topbar .brand { gap: 10px; align-items: flex-end; }
body .topbar .edge-wordmark { height: 36.8px; width: auto; margin-bottom: 3.8px; flex: 0 0 auto; }
body .topbar .brand-meta { display: none; }
body .chart-toolbar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: relative; gap: 4px; width: 100%; padding: 4px 8px; }
body .chart-toolbar .workspace-title { display: none; }
body .chart-toolbar .panel-toggles { display: contents; border: 0; margin: 0; padding: 0; }
body #history-tools { min-width: 0; }
body .history-panel, body .history-panel[open] { margin: 0; padding: 0; border: 0; }
body .chart-toolbar #btn-chart-layout,
body .chart-toolbar .panel-toggles button,
body .history-panel > summary {
  box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 100%; height: 48px; min-height: 48px; margin: 0; padding: 3px 4px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: #b2b2b2;
  font: 400 11px/1.1 'D-DIN',sans-serif; letter-spacing: 0; cursor: pointer; white-space: nowrap;
}
body #btn-chart-layout > span[aria-hidden] { display: none; }
body .chart-toolbar .ui-icon { width: 24px; height: 24px; flex: 0 0 24px; }
body .history-panel > summary::before, body .history-panel[open] > summary::before { content: none; }
body .history-panel > summary::marker { content: ''; }
body .history-panel > summary::-webkit-details-marker { display: none; }
body .chart-toolbar :is(#btn-chart-layout,.icon-btn):hover, body .history-panel > summary:hover { background: #343745; color: #dadada; }
body .chart-toolbar :is(#btn-chart-layout,.icon-btn)[aria-expanded=true], body .history-panel[open] > summary { color: #f1a472; background: #dc7d4612; }
body .chart-toolbar :is(button,summary):focus-visible { outline: 2px solid #dc7d46; outline-offset: -2px; }
body .chart-toolbar .layout-picker { display: none; }
body .chart-toolbar .layout-picker.picker-open { display: flex; position: absolute; z-index: 60; top: 100%; left: 6px; right: 6px; padding: 6px; border: 1px solid #55576a; box-shadow: 0 8px 24px #0008; justify-content: space-between; }
body .chart-toolbar .layout-picker button { flex: 1; min-height: 44px; }
body .history-panel .history-toolbar { position: absolute; z-index: 80; right: 0; top: 100%; max-width: 520px; padding: 12px; background: #292c38; border: 1px solid #626575; border-radius: 10px; box-shadow: 0 8px 24px #0008; }
body .history-options-close { display: block; }
.chart-actions { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-left: auto; min-width: 0; flex: 1; max-width: 360px; }
body .chart-cell .head .chart-actions button {
  box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1 1 0; width: 0; gap: 3px; height: 48px; min-height: 48px; padding: 3px 2px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: #b2b2b2;
  font: 400 11px/1.1 'D-DIN',sans-serif; white-space: nowrap; cursor: pointer;
}
body .chart-cell .head .chart-actions .ui-icon { width: 24px; height: 24px; flex: 0 0 24px; }
body .chart-cell .head .chart-actions .focus-btn { display: none; }
body #chart-grid .chart-cell .head .chart-actions .fullscreen-btn { flex: 1 1 0; width: 0; min-height: 48px; padding: 3px 2px; font-size: 11px; }
body #chart-grid .chart-cell .head .chart-actions .fullscreen-btn::after { content: none; }
body .chart-cell .head .chart-actions button:hover { background: #343745; color: #dadada; }
body .chart-cell .head .chart-actions button:focus-visible { outline: 2px solid #dc7d46; outline-offset: -2px; }
body .chart-cell .head .chart-actions .chart-follow-btn[aria-pressed=true] { color: #f1a472; background: #dc7d4612; }
.chart-tools > .st { margin-left: auto; font-size: 11px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 680px) {
  body .topbar .edge-wordmark { height: 29.2px; margin-bottom: 3px; }
  body .topbar-feed { grid-template-columns: auto minmax(0,1fr); }
  body .chart-toolbar { padding: 0; gap: 2px; }
  body .history-panel .history-toolbar { position: fixed; top: auto; bottom: calc(68px + env(safe-area-inset-bottom)); left: 8px; right: 8px; max-width: none; }
  body .chart-cell .head .st { display: none; }
  body .chart-cell .head .chart-price, body .chart-cell .head .chart-symbol { font-size: 11px; }
  body .chart-grid:not(.layout-1) .chart-cell:not(.chart-expanded) .chart-actions :is(.chart-follow-btn,.chart-fit-btn) { display: none; }
}
