.title-bar {
  height: 48px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 8px;
  -webkit-app-region: drag;
  flex-shrink: 0;
  gap: 8px;
  position: relative;
  z-index: 2101;
}

.title-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.title-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.titles {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.title-sidebar-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-app-region: no-drag;

  &:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
  }
}

.title-window-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  -webkit-app-region: no-drag;
}

.title-window-control-btn {
  width: 36px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;

  &:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
  }

  &.is-close:hover {
    background: #e5484d;
    color: #fff;
  }
}

.image-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  padding-left: 16px;
  -webkit-app-region: no-drag;

  button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;

    &:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    &:disabled {
      cursor: default;
      opacity: 1;
    }

    &.live-play-btn.active {
      background: var(--primary-light);
      color: var(--primary);
    }
  }

  .scale-text {
    min-width: 50px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .divider {
    width: 1px;
    height: 14px;
    background: var(--border-color);
    margin: 0 4px;
  }
}
