:root {
  color-scheme: light;
  --app-bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-hover: #f2f5f9;
  --surface-pressed: #edf1f6;
  --text: #171b22;
  --text-soft: #4f5865;
  --muted: #7d8794;
  --faint: #aab2bd;
  --border: #e5e9ef;
  --border-strong: #d8dee7;
  --grid: #eef2f6;
  --grid-hidden: rgba(255, 255, 255, 0);
  --accent: #f29a1b;
  --accent-strong: #df7f08;
  --accent-soft: rgba(242, 154, 27, 0.1);
  --green: #11996c;
  --green-soft: rgba(17, 153, 108, 0.1);
  --red: #df4d5b;
  --red-soft: rgba(223, 77, 91, 0.1);
  --blue: #2b7fd6;
  --violet: #7c63d4;
  --topbar-height: 64px;
  --bottom-height: 38px;
  --toolbar-width: 52px;
  --favorites-width: 282px;
  --shadow-menu: 0 24px 70px rgba(20, 28, 40, 0.14), 0 5px 18px rgba(20, 28, 40, 0.08);
  --shadow-soft: 0 10px 36px rgba(22, 33, 49, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #000000;
  --surface: rgba(3, 3, 3, 0.92);
  --surface-solid: #000000;
  --surface-soft: #070707;
  --surface-hover: #101010;
  --surface-pressed: #171717;
  --text: #f5f7fa;
  --text-soft: #c7cbd1;
  --muted: #8b919a;
  --faint: #626872;
  --border: #1b1d21;
  --border-strong: #2a2d32;
  --grid: #131519;
  --grid-hidden: rgba(0, 0, 0, 0);
  --accent: #f5a62e;
  --accent-strong: #ffb746;
  --accent-soft: rgba(245, 166, 46, 0.13);
  --green: #21bf8b;
  --green-soft: rgba(33, 191, 139, 0.12);
  --red: #ff6171;
  --red-soft: rgba(255, 97, 113, 0.12);
  --blue: #5ea4ec;
  --violet: #9a83ed;
  --shadow-menu: 0 28px 80px rgba(0, 0, 0, 0.48), 0 5px 18px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 42px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--app-bg);
  color: var(--text);
}

body {
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 76%, white);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ui-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon--chevron {
  width: 15px;
  height: 15px;
  stroke-width: 1.55;
}

.avro-chart-app {
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr) var(--bottom-height);
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--surface-solid);
}

.avro-chart-app:fullscreen {
  width: 100vw;
  height: 100vh;
}

.avro-chart-app.favorites-collapsed {
  --favorites-width: 52px;
}

.chart-topbar {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: center;
  min-width: 0;
  height: var(--topbar-height);
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--surface-solid) 58%, transparent);
  backdrop-filter: blur(24px) saturate(150%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 31px;
  height: 31px;
  filter: drop-shadow(0 4px 9px rgba(226, 127, 10, 0.18));
}

.brand__word {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0.11em;
}

.topbar-separator {
  flex: 0 0 1px;
  width: 1px;
  height: 31px;
  margin: 0 17px;
  background: var(--border);
}

.topbar-separator--compact {
  height: 25px;
  margin-inline: 11px;
}

.topbar-control,
.topbar-action,
.topbar-icon-button,
.favorites-header__actions button,
.favorites-footer button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.topbar-control {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--text);
}

.topbar-control:hover,
.topbar-action:hover,
.topbar-icon-button:hover {
  background: var(--surface-hover);
}

.symbol-trigger {
  gap: 8px;
}

.symbol-trigger__pair {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.symbol-trigger__pair strong {
  font-weight: 690;
}

.symbol-trigger__pair span {
  color: var(--muted);
  font-weight: 500;
}

.asset-logo {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #f8a92f, #e37d08);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 2px 7px rgba(21, 29, 40, 0.1);
}

.asset-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 140ms ease;
}

.asset-logo img.is-loaded {
  opacity: 1;
}

.asset-logo > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 760;
  line-height: 1;
}

.asset-logo--header {
  width: 27px;
  height: 27px;
  font-size: 15px;
}

.asset-logo--legend {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.favorite-toggle {
  margin-left: 2px;
  color: var(--faint);
}

.favorite-toggle[aria-pressed="true"] {
  color: var(--accent);
}

.favorite-toggle[aria-pressed="true"] .ui-icon {
  fill: currentColor;
}

.timeframe-shell,
.menu-shell {
  position: relative;
  flex: 0 0 auto;
}

.timeframe-trigger {
  gap: 4px;
  min-width: 57px;
  justify-content: center;
  border: 1px solid var(--border);
}

.timeframe-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.timeframe-trigger strong {
  font-size: 12px;
  font-weight: 720;
}

.topbar-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 610;
  white-space: nowrap;
}

.topbar-action .ui-icon {
  width: 19px;
  height: 19px;
}

.topbar-action[aria-expanded="true"] {
  background: var(--surface-hover);
  color: var(--text);
}

.topbar-spacer {
  flex: 1 1 auto;
  min-width: 10px;
}

.history-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar-icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  color: var(--text-soft);
}

.topbar-icon-button:disabled {
  color: var(--faint);
  opacity: 0.48;
  cursor: default;
}

.topbar-icon-button:disabled:hover {
  background: transparent;
}

.settings-trigger {
  width: 40px;
  height: 40px;
}

.settings-trigger[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chart-body {
  position: relative;
  display: grid;
  grid-template-columns: var(--toolbar-width) minmax(0, 1fr) var(--favorites-width);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-solid);
  transition: grid-template-columns 180ms ease;
}

.avro-chart-app.layout-focus .chart-body {
  grid-template-columns: var(--toolbar-width) minmax(0, 1fr) 0;
}

.avro-chart-app.layout-focus .favorites-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.avro-chart-app.layout-compact {
  --favorites-width: 232px;
}

.chart-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-solid);
}

.chart-surface {
  position: absolute;
  inset: 0;
  background: var(--surface-solid);
  touch-action: pan-x pan-y;
}

.chart-surface.is-drawing {
  cursor: crosshair;
  touch-action: none;
}

.chart-legend {
  position: absolute;
  z-index: 15;
  top: 13px;
  left: 17px;
  display: grid;
  gap: 7px;
  max-width: calc(100% - 130px);
  padding: 7px 10px 8px 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  backdrop-filter: blur(9px) saturate(120%);
  pointer-events: none;
}

:root[data-theme="dark"] .chart-legend {
  border-color: rgba(255, 255, 255, 0.035);
  background: rgba(11, 15, 23, 0.76);
}

.chart-legend__headline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-legend__headline > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.chart-legend__headline strong {
  font-size: 13px;
  font-weight: 650;
}

.chart-legend__headline span {
  color: var(--muted);
  font-size: 11px;
}

.chart-legend__headline b {
  font-weight: 650;
}

.ohlc-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding-left: 32px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.ohlc-row span {
  display: inline-flex;
  gap: 3px;
}

.ohlc-row b {
  color: var(--text-soft);
  font-weight: 570;
}

.ohlc-row > strong {
  color: var(--green);
  font-weight: 680;
}

.ohlc-row > strong.is-down {
  color: var(--red);
}

.chart-state-card {
  position: absolute;
  z-index: 25;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(20px) saturate(140%);
  transition: opacity 150ms ease, visibility 150ms ease;
}

.chart-state-card.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.chart-state-card.is-error .state-spinner {
  border-color: var(--red-soft);
  border-top-color: var(--red);
}

.chart-state-card > div {
  display: grid;
  gap: 3px;
}

.chart-state-card strong {
  font-size: 12px;
  font-weight: 700;
}

.chart-state-card span {
  color: var(--muted);
  font-size: 10px;
}

.state-spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: state-spin 800ms linear infinite;
}

@keyframes state-spin {
  to { transform: rotate(360deg); }
}

.drawing-status,
.live-status {
  position: absolute;
  z-index: 18;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  box-shadow: 0 4px 13px rgba(22, 32, 47, 0.05);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.drawing-status {
  left: 10px;
  gap: 7px;
  padding: 0 9px 0 6px;
}

.drawing-status kbd {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.live-status {
  right: 86px;
  gap: 7px;
  padding: 0 9px;
}

.live-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--faint) 13%, transparent);
}

.live-status.is-live i {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.live-status.is-error i {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.favorites-panel {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-rows: 55px 34px minmax(0, 1fr) 32px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--surface-solid);
  transition: opacity 160ms ease, visibility 160ms ease;
}

.favorites-panel.is-collapsed {
  grid-template-rows: 55px minmax(0, 1fr);
}

.favorites-panel.is-collapsed .favorites-columns,
.favorites-panel.is-collapsed .favorites-list,
.favorites-panel.is-collapsed .favorites-footer,
.favorites-panel.is-collapsed .favorites-header__actions {
  display: none;
}

.favorites-panel.is-collapsed .favorites-header {
  justify-content: center;
  padding: 0;
}

.favorites-panel.is-collapsed .favorites-title {
  justify-content: center;
  width: 40px;
  padding: 0;
}

.favorites-panel.is-collapsed .favorites-title strong,
.favorites-panel.is-collapsed .favorites-star {
  display: none;
}

.favorites-panel.is-collapsed .favorites-title .ui-icon--chevron {
  transform: rotate(-90deg);
}

.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
}

.favorites-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.favorites-title:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.favorites-title strong {
  font-size: 12px;
  font-weight: 680;
}

.favorites-title .ui-icon--chevron {
  color: var(--muted);
  transition: transform 150ms ease;
}

.favorites-star {
  width: 17px;
  height: 17px;
  fill: var(--accent);
  stroke: var(--accent);
}

.favorites-header__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.favorites-header__actions button,
.favorites-footer button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border-radius: 7px;
  color: var(--muted);
}

.favorites-header__actions button:hover,
.favorites-footer button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.favorites-header__actions .ui-icon,
.favorites-footer .ui-icon {
  width: 18px;
  height: 18px;
}

.favorites-actions-menu {
  position: absolute;
  top: 49px;
  right: 8px;
  z-index: 80;
  display: grid;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(20px) saturate(145%);
}

.favorites-actions-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
}

.favorites-actions-menu button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.favorites-actions-menu span {
  height: 1px;
  margin: 5px 3px;
  background: var(--border);
}

.favorites-columns {
  display: grid;
  grid-template-columns: minmax(104px, 1fr) 77px 58px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
}

.favorites-columns span:nth-child(2),
.favorites-columns span:nth-child(3) {
  text-align: right;
}

.favorites-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

.favorites-list::-webkit-scrollbar {
  width: 6px;
}

.favorites-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--border-strong);
  background-clip: padding-box;
}

.favorite-row {
  display: grid;
  grid-template-columns: minmax(104px, 1fr) 77px 58px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.favorite-row:hover,
.favorite-row.is-active {
  background: var(--surface-hover);
}

.favorite-row.is-active {
  box-shadow: inset 2px 0 0 var(--accent);
}

.favorite-row__asset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.favorite-row .asset-logo {
  width: 25px;
  height: 25px;
  font-size: 10px;
}

.favorite-row__pair {
  display: flex;
  align-items: baseline;
  min-width: 0;
  font-size: 10px;
  white-space: nowrap;
}

.favorite-row__pair strong {
  color: var(--text);
  font-weight: 700;
}

.favorite-row__pair span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 8px;
}

.favorite-row__price,
.favorite-row__change {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.favorite-row__price {
  color: var(--text-soft);
  font-weight: 600;
}

.favorite-row__change {
  color: var(--green);
  font-weight: 680;
}

.favorite-row__change.is-down {
  color: var(--red);
}

.favorite-row.is-loading .favorite-row__price,
.favorite-row.is-loading .favorite-row__change {
  color: var(--faint);
}

.favorites-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding-left: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 8px;
}

.chart-bottombar {
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: var(--bottom-height);
  padding: 0 8px 0 calc(var(--toolbar-width) + 8px);
  border-top: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px);
}

.range-shortcuts,
.bottom-status {
  display: flex;
  align-items: center;
  gap: 2px;
}

.range-shortcuts button,
.bottom-status button {
  height: 25px;
  min-width: 29px;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.range-shortcuts button:hover,
.range-shortcuts button.is-active,
.bottom-status button:hover,
.bottom-status button.is-active {
  background: var(--surface-hover);
  color: var(--text);
}

.bottom-status {
  flex: 0 0 auto;
}

.bottom-status > span {
  color: var(--muted);
  font-size: 9px;
}

.bottom-separator {
  width: 1px;
  height: 18px;
  margin: 0 5px;
  background: var(--border);
}

.bottom-status button.is-active {
  color: var(--accent-strong);
}

/* Top-bar menus */
.menu-panel {
  position: absolute;
  z-index: 150;
  top: calc(100% + 8px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(26px) saturate(150%);
  animation: menu-in 110ms ease-out;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
}

.timeframe-menu {
  left: 0;
  width: 218px;
  max-height: min(550px, calc(100vh - var(--topbar-height) - 24px));
  padding: 7px;
  overflow-y: auto;
}

.timeframe-menu__section + .timeframe-menu__section {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
}

.timeframe-menu__title {
  display: block;
  padding: 7px 9px 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.09em;
}

.timeframe-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25px;
  align-items: center;
  width: 100%;
  height: 37px;
  padding: 0 6px 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
}

.timeframe-item:hover,
.timeframe-item.is-active {
  background: var(--surface-hover);
  color: var(--text);
}

.timeframe-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.timeframe-item span {
  font-size: 11px;
  font-weight: 560;
}

.timeframe-item svg {
  width: 14px;
  height: 14px;
  justify-self: center;
  fill: currentColor;
  stroke: currentColor;
  opacity: 0;
}

.timeframe-item.is-active svg {
  opacity: 1;
}

.action-menu {
  left: 0;
  width: 250px;
}

.menu-panel__header {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
}

.menu-panel__header > div {
  display: grid;
  gap: 3px;
}

.menu-panel__header strong {
  font-size: 11px;
  font-weight: 710;
}

.menu-panel__header span {
  color: var(--muted);
  font-size: 9px;
}

.menu-switch {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 12px;
  color: var(--text-soft);
  font-size: 10px;
  cursor: pointer;
}

.menu-switch:hover {
  background: var(--surface-hover);
}

.menu-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-switch i {
  position: relative;
  width: 32px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.menu-switch i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--faint);
  content: "";
  transition: transform 120ms ease, background-color 120ms ease;
}

.menu-switch input:checked + i {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  background: var(--accent-soft);
}

.menu-switch input:checked + i::after {
  background: var(--accent);
  transform: translateX(14px);
}

.menu-switch__swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.menu-switch__swatch--ema21 {
  background: var(--blue);
}

.menu-switch__swatch--ema55 {
  background: var(--violet);
}

.compact-choice-menu {
  width: 226px;
  padding: 6px;
}

.compact-choice-menu > button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.compact-choice-menu > button:hover,
.compact-choice-menu > button.is-active {
  background: var(--surface-hover);
}

.compact-choice-menu > button.is-active {
  box-shadow: inset 2px 0 0 var(--accent);
}

.compact-choice-menu strong {
  font-size: 10px;
  font-weight: 660;
}

.compact-choice-menu span {
  color: var(--muted);
  font-size: 8px;
}

.settings-panel {
  right: 0;
  left: auto;
  width: 272px;
}

.settings-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.theme-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.theme-choice button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 35px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.theme-choice button.is-active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 2px 7px rgba(20, 29, 43, 0.08);
}

:root[data-theme="dark"] .theme-choice button.is-active {
  background: var(--surface-pressed);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.3);
}

.theme-choice .ui-icon {
  width: 17px;
  height: 17px;
}

.menu-switch--settings {
  grid-template-columns: minmax(0, 1fr) 34px;
  border-bottom: 1px solid var(--border);
}

.menu-switch--settings:last-child {
  border-bottom: 0;
}

#global-menu-backdrop {
  position: fixed;
  z-index: 70;
  inset: var(--topbar-height) 0 0;
  background: transparent;
}

/* Drawing toolbar and original-engine UI adapter */
.drawing-toolbar {
  position: relative;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: var(--toolbar-width);
  min-height: 0;
  padding: 6px 5px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent);
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: none;
}

.drawing-toolbar::-webkit-scrollbar {
  display: none;
}

.toolbar-section {
  display: grid;
  gap: 2px;
}

.toolbar-section--actions {
  margin-top: 2px;
}

.toolbar-divider {
  width: 30px;
  height: 1px;
  margin: 6px auto;
  background: var(--border);
}

.toolbar-button,
.toolbar-group__primary,
.toolbar-group__menu,
.toolbar-menu__item,
.toolbar-menu__favorite,
.toolbar-palette__tab,
.toolbar-palette__empty {
  border: 0;
  background: transparent;
}

.toolbar-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 41px;
  height: 39px;
  margin: 0 auto;
  padding: 0;
  border-radius: 8px;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease;
}

.toolbar-button:hover,
.toolbar-button.is-active {
  background: var(--surface-hover);
  color: var(--text);
}

.toolbar-button.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

:root:not([data-theme="dark"]) .toolbar-button:not(:disabled),
:root:not([data-theme="dark"]) .toolbar-group,
:root:not([data-theme="dark"]) .toolbar-menu__item,
:root:not([data-theme="dark"]) .toolbar-menu__icon,
:root:not([data-theme="dark"]) .toolbar-menu__favorite {
  color: #11161d;
}

:root:not([data-theme="dark"]) .toolbar-button:hover,
:root:not([data-theme="dark"]) .toolbar-button.is-active,
:root:not([data-theme="dark"]) .toolbar-group:hover,
:root:not([data-theme="dark"]) .toolbar-group.is-active,
:root:not([data-theme="dark"]) .toolbar-group.is-open {
  background: rgba(255, 255, 255, 0.76);
  color: #0b0f14;
  box-shadow:
    inset 0 0 0 1px rgba(17, 22, 29, 0.09),
    0 5px 14px rgba(24, 34, 48, 0.08);
  backdrop-filter: blur(12px) saturate(135%);
}

:root:not([data-theme="dark"]) .toolbar-button.is-active,
:root:not([data-theme="dark"]) .toolbar-group.is-active {
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent),
    0 5px 14px rgba(24, 34, 48, 0.08);
}

.toolbar-button.is-active::before {
  position: absolute;
  left: -5px;
  width: 2px;
  height: 19px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  content: "";
}

.toolbar-button.is-danger:hover {
  background: var(--red-soft);
  color: var(--red);
}

.toolbar-button:disabled {
  color: var(--faint);
  opacity: 0.48;
  cursor: default;
}

.toolbar-button:disabled:hover {
  background: transparent;
}

.toolbar-icon,
.toolbar-menu__icon {
  display: inline-grid;
  place-items: center;
}

.toolbar-icon svg {
  width: 20px;
  height: 20px;
}

.toolbar-group {
  position: relative;
  display: grid;
  grid-template-columns: 32px 9px;
  width: 41px;
  height: 39px;
  margin: 0 auto;
  border-radius: 8px;
  color: var(--text-soft);
  transition: background-color 120ms ease, color 120ms ease;
}

.toolbar-group:hover,
.toolbar-group.is-active,
.toolbar-group.is-open {
  background: var(--surface-hover);
  color: var(--text);
}

.toolbar-group.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.toolbar-group.is-active::before {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: -5px;
  width: 2px;
  height: 19px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  content: "";
}

.toolbar-group__primary,
.toolbar-group__menu {
  min-width: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.toolbar-group__primary {
  display: grid;
  place-items: center;
  border-radius: 8px 2px 2px 8px;
}

.toolbar-group__primary .toolbar-icon svg {
  width: 20px;
  height: 20px;
}

.toolbar-group__menu {
  display: grid;
  place-items: center;
  border-radius: 2px 8px 8px 2px;
}

.toolbar-group__menu::after {
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 3px solid currentColor;
  content: "";
  opacity: 0.62;
}

.toolbar-group--single {
  grid-template-columns: 1fr;
}

.toolbar-group--single .toolbar-group__primary {
  grid-column: 1 / -1;
  width: 100%;
  border-radius: 8px;
}

.toolbar-group--featured {
  margin-bottom: 7px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 88%, var(--surface-solid)), var(--surface-solid));
  color: var(--accent-strong);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent),
    0 5px 14px color-mix(in srgb, var(--accent) 16%, transparent);
}

.toolbar-group--featured:hover,
.toolbar-group--featured.is-active {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 96%, var(--surface-solid)), var(--surface-hover));
  color: var(--accent-strong);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 58%, transparent),
    0 7px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.toolbar-group--featured .toolbar-group__primary::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  content: "";
}

.toolbar-group--featured .toolbar-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.65;
}

.toolbar-tooltip {
  position: fixed;
  z-index: 260;
  width: max-content;
  max-width: 230px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(22, 27, 35, 0.95);
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transform: translateY(-50%);
}

.toolbar-tooltip kbd {
  margin-left: 9px;
  color: #aeb6c1;
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.toolbar-popover {
  position: fixed;
  z-index: 250;
  width: 250px;
  max-height: min(470px, calc(100vh - 20px));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 98%, transparent);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(24px) saturate(150%);
  animation: toolbar-popover-in 100ms ease-out;
}

@keyframes toolbar-popover-in {
  from {
    opacity: 0;
    transform: translateX(-4px) scale(0.985);
  }
}

.toolbar-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 11px 0 13px;
  border-bottom: 1px solid var(--border);
}

.toolbar-popover__header strong {
  font-size: 11px;
  font-weight: 690;
}

.toolbar-popover__header span {
  color: var(--muted);
  font-size: 8px;
}

.toolbar-menu {
  max-height: 402px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

.toolbar-menu__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 29px;
  min-height: 37px;
  border-radius: 7px;
}

.toolbar-menu__row:hover,
.toolbar-menu__row.is-active {
  background: var(--surface-hover);
}

.toolbar-menu__row.is-active {
  box-shadow: inset 2px 0 0 var(--accent);
}

:root:not([data-theme="dark"]) .toolbar-menu__row:hover,
:root:not([data-theme="dark"]) .toolbar-menu__row.is-active {
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(17, 22, 29, 0.08),
    0 4px 12px rgba(24, 34, 48, 0.06);
  backdrop-filter: blur(12px) saturate(135%);
}

:root:not([data-theme="dark"]) .toolbar-menu__row.is-active {
  box-shadow:
    inset 2px 0 0 var(--accent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
    0 4px 12px rgba(24, 34, 48, 0.06);
}

.toolbar-menu__item {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 5px 0 8px;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
}

.toolbar-menu__icon {
  color: var(--text-soft);
}

.toolbar-menu__icon svg {
  width: 18px;
  height: 18px;
}

.toolbar-menu__label {
  overflow: hidden;
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-menu__shortcut {
  color: var(--faint);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.toolbar-menu__favorite {
  display: grid;
  place-items: center;
  width: 29px;
  height: 37px;
  padding: 0;
  color: var(--faint);
  cursor: pointer;
}

.toolbar-menu__favorite:hover,
.toolbar-menu__favorite.is-favorite {
  color: var(--accent);
}

.toolbar-menu__favorite svg {
  width: 14px;
  height: 14px;
}

.toolbar-palette__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px;
  border-bottom: 1px solid var(--border);
}

.toolbar-palette__tab {
  height: 30px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 640;
  cursor: pointer;
}

.toolbar-palette__tab.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.toolbar-palette__empty {
  width: 100%;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

/* Symbol dialog */
.symbol-dialog {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: grid;
  place-items: start center;
  padding-top: min(12vh, 110px);
  background: rgba(10, 15, 23, 0.28);
  backdrop-filter: blur(8px);
}

:root[data-theme="dark"] .symbol-dialog {
  background: rgba(0, 0, 0, 0.5);
}

.symbol-dialog__card {
  width: min(510px, calc(100vw - 26px));
  max-height: min(650px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: var(--surface-solid);
  box-shadow: 0 34px 100px rgba(14, 22, 34, 0.26);
}

:root[data-theme="dark"] .symbol-dialog__card {
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.56);
}

.symbol-dialog__card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 67px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--border);
}

.symbol-dialog__card > header > div {
  display: grid;
  gap: 4px;
}

.symbol-dialog__card > header strong {
  font-size: 14px;
  font-weight: 720;
}

.symbol-dialog__card > header span {
  color: var(--muted);
  font-size: 9px;
}

.symbol-dialog__card > header button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.symbol-dialog__card > header button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.symbol-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 45px;
  margin: 13px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.symbol-search .ui-icon {
  width: 18px;
  height: 18px;
}

.symbol-search input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.symbol-search input::placeholder {
  color: var(--faint);
}

.symbol-results {
  max-height: min(500px, calc(100vh - 270px));
  padding: 0 7px 9px;
  overflow-y: auto;
}

.symbol-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.symbol-option:hover,
.symbol-option.is-active {
  background: var(--surface-hover);
}

.symbol-option__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.symbol-option .asset-logo {
  width: 29px;
  height: 29px;
  font-size: 11px;
}

.symbol-option__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.symbol-option__copy strong {
  font-size: 11px;
  font-weight: 690;
}

.symbol-option__copy span,
.symbol-option__quote {
  color: var(--muted);
  font-size: 9px;
}

.toast {
  position: fixed;
  z-index: 500;
  right: 18px;
  bottom: 54px;
  min-width: 190px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(18px);
}

.drawing-properties-toolbar {
  position: fixed;
  z-index: 145;
  top: calc(var(--topbar-height) + 10px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 24px);
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-solid) 91%, transparent);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(20px) saturate(150%);
  transform: translateX(-50%);
}

.drawing-properties-toolbar label,
.drawing-properties-toolbar button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
}

.drawing-properties-toolbar button {
  cursor: pointer;
}

.drawing-properties-toolbar button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.drawing-properties-toolbar button.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.drawing-properties-toolbar button.is-danger {
  color: var(--red);
}

.drawing-properties-toolbar input[type="color"] {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.drawing-properties-toolbar select {
  height: 31px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-solid);
  color: var(--text-soft);
  font-size: 10px;
}

.drawing-properties-toolbar__divider {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: var(--border);
}

.drawing-settings-card {
  width: min(620px, calc(100vw - 28px));
}

.drawing-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: min(62vh, 560px);
  padding: 16px;
  overflow: auto;
}

.drawing-setting-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.drawing-setting-field input,
.drawing-setting-field select,
.drawing-setting-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
}

.drawing-setting-field input[type="color"] {
  min-height: 40px;
  padding: 3px;
}

.drawing-setting-field--wide {
  grid-column: 1 / -1;
}

.drawing-setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
}

.drawing-setting-toggle input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.drawing-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.drawing-settings-actions button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text-soft);
  cursor: pointer;
}

.drawing-settings-actions button.is-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

@media (max-width: 1120px) {
  :root {
    --favorites-width: 250px;
  }

  .topbar-action--optional,
  .optional-separator {
    display: none;
  }
}

@media (max-width: 850px) {
  :root {
    --favorites-width: 0px;
  }

  .favorites-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .avro-chart-app.favorites-collapsed {
    --favorites-width: 0px;
  }

  .topbar-separator {
    margin-inline: 10px;
  }

  .brand__word {
    display: none;
  }

  .chart-legend {
    max-width: calc(100% - 80px);
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-height: 54px;
    --bottom-height: 34px;
    --toolbar-width: 0px;
  }

  .chart-topbar {
    padding-inline: 8px;
  }

  .brand__mark {
    width: 28px;
    height: 28px;
  }

  .brand + .topbar-separator,
  .favorite-toggle,
  .topbar-separator--compact,
  .topbar-actions,
  .history-controls {
    display: none;
  }

  .symbol-trigger {
    padding-inline: 5px;
  }

  .asset-logo--header {
    width: 25px;
    height: 25px;
  }

  .symbol-trigger__pair {
    font-size: 11px;
  }

  .timeframe-shell {
    margin-left: 5px;
  }

  .settings-shell {
    margin-left: auto;
  }

  .chart-body {
    display: block;
  }

  .drawing-toolbar {
    position: absolute;
    z-index: 65;
    right: 7px;
    bottom: 7px;
    left: 7px;
    flex-direction: row;
    align-items: center;
    width: auto;
    min-height: 46px;
    padding: 3px 5px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px) saturate(140%);
    scrollbar-width: none;
  }

  .drawing-toolbar::-webkit-scrollbar {
    display: none;
  }

  .toolbar-section {
    display: flex;
    flex: 0 0 auto;
  }

  .toolbar-section--actions {
    margin: 0;
  }

  .toolbar-divider {
    flex: 0 0 1px;
    width: 1px;
    height: 29px;
    margin: 4px 5px;
  }

  .toolbar-group--featured {
    margin-right: 7px;
    margin-bottom: 0;
  }

  .toolbar-button.is-active::before,
  .toolbar-group.is-active::before {
    top: auto;
    bottom: -3px;
    left: 11px;
    width: 19px;
    height: 2px;
    border-radius: 2px 2px 0 0;
  }

  .toolbar-popover {
    width: min(250px, calc(100vw - 18px));
  }

  .chart-legend {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 45px);
  }

  .chart-legend__headline strong {
    font-size: 11px;
  }

  .ohlc-row {
    gap: 6px;
    padding-left: 0;
    font-size: 8px;
  }

  .drawing-status,
  .live-status {
    bottom: 60px;
  }

  .live-status {
    right: 8px;
  }

  .chart-bottombar {
    padding-left: 5px;
  }

  .range-shortcuts button:nth-child(2),
  .range-shortcuts button:nth-child(4),
  .range-shortcuts button:nth-child(5),
  .range-shortcuts button:nth-child(6),
  .range-shortcuts button:nth-child(8),
  #utc-clock,
  .bottom-separator {
    display: none;
  }

  .settings-panel {
    position: fixed;
    top: calc(var(--topbar-height) + 7px);
    right: 7px;
    width: min(272px, calc(100vw - 14px));
  }

  .timeframe-menu {
    position: fixed;
    top: calc(var(--topbar-height) + 7px);
    left: 7px;
    width: min(218px, calc(100vw - 14px));
  }

  .symbol-dialog {
    padding-top: 65px;
  }

  .drawing-properties-toolbar {
    overflow-x: auto;
  }

  .drawing-settings-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .drawing-setting-field--wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
