.topbar .symbol-button {
  min-width: 0;
  max-width: 148px;
  height: 32px;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--control-line);
  border-radius: 7px;
  background: var(--surface-input);
}

.topbar .symbol-button:hover {
  background: var(--surface-hover);
}

.topbar .symbol-button .tiny-search {
  flex: none;
  line-height: 1;
}

.topbar .symbol-button b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 800px) {
  #root {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }

  #root > .workspace {
    flex: 1;
    height: auto;
  }

  .topbar {
    display: grid;
    flex: none;
    grid-template-columns: var(--drawing-rail-width) auto minmax(0, 1fr) 57px 48px;
    grid-template-rows: 40px;
    height: auto;
    padding: 4px 8px 4px 0;
    column-gap: 2px;
  }

  .topbar .brand {
    grid-row: 1;
    grid-column: 1;
  }

  .topbar .symbol-button {
    grid-row: 1;
    grid-column: 2;
    justify-self: start;
    /* Keep the favorite strip and selector usable beside the larger account button. */
    max-width: clamp(54px, calc(100vw - 354px), 148px);
    gap: 4px;
    padding-inline: 5px;
  }

  .topbar .timeframes {
    grid-row: 1;
    grid-column: 3;
  }

  .topbar .interval-menu {
    gap: 4px;
  }

  .topbar .timeframes :is(.interval-favorite, .interval-menu-trigger) {
    padding-inline: 2px;
    font-size: 12px;
  }

  .topbar .interval-favorite {
    min-width: 24px;
  }

  .topbar .interval-menu-trigger {
    min-width: 34px;
    min-height: 36px;
    gap: 3px;
  }

  .topbar .indicator-control {
    display: grid;
    grid-row: 1;
    grid-column: 4;
    grid-template-columns: 32px 25px;
    align-items: center;
  }

  .topbar .indicator-quick-trigger {
    height: 32px;
    padding: 0;
  }

  .topbar #indicators-button {
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .topbar #indicators-button span {
    display: none;
  }

  .topbar .indicator-control > .indicator-quick-panel {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 6px);
  }

  .topbar .account-button {
    position: relative;
    grid-row: 1;
    grid-column: 5;
    justify-content: center;
    justify-self: end;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
  }

  .topbar .account-button .avatar {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .topbar .account-connection {
    position: absolute;
    inset-inline-end: 3px;
    bottom: 3px;
  }

  .topbar :is(#engine, .top-spacer, .divider, .engine-label) {
    display: none;
  }

  .topbar .install-actions {
    grid-row: 2;
    grid-column: 2 / -1;
    justify-content: end;
    margin-block-start: 4px;
  }

  .topbar .install-certificate-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--accent);
    font-size: 12px;
  }
}
